2020-09-06 18:12:34 -07:00
|
|
|
import React from "react";
|
2020-09-10 02:32:14 -07:00
|
|
|
import { Box } from "@chakra-ui/core";
|
|
|
|
import loadable from "@loadable/component";
|
2020-09-06 18:12:34 -07:00
|
|
|
|
2020-09-10 02:32:14 -07:00
|
|
|
const GlobalNavBar = loadable(() => import("./GlobalNavBar"));
|
2020-09-06 18:42:39 -07:00
|
|
|
|
2020-09-07 19:46:11 -07:00
|
|
|
function PageLayout({ children }) {
|
2020-09-06 18:12:34 -07:00
|
|
|
return (
|
2020-09-06 22:58:06 -07:00
|
|
|
<Box padding="6" paddingTop="3" maxWidth="1024px" margin="0 auto">
|
2020-09-06 18:42:39 -07:00
|
|
|
<Box
|
|
|
|
width="100%"
|
|
|
|
marginBottom="6"
|
2020-09-06 18:54:27 -07:00
|
|
|
// Leave space while content is still loading
|
|
|
|
minHeight="2rem"
|
2020-09-06 18:42:39 -07:00
|
|
|
>
|
2020-09-10 02:32:14 -07:00
|
|
|
<GlobalNavBar />
|
2020-09-06 18:12:34 -07:00
|
|
|
</Box>
|
|
|
|
{children}
|
|
|
|
</Box>
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
export default PageLayout;
|