-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlayout.js
31 lines (28 loc) · 853 Bytes
/
layout.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
"use client";
import { Suspense } from "react";
import { ChakraProvider, Box } from "@chakra-ui/react";
import { Header, Footer } from "components";
import { LayoutProvider } from "context/layout";
import { theme, navigationHeight, footerHeight } from "utils/theme-config";
import Loading from "./loading";
import "./global.css";
export default function RootLayout({ children }) {
return (
<html lang="en">
<body>
<ChakraProvider theme={theme}>
<Header />
<LayoutProvider>
<Box
as="main"
minHeight={`calc(100vh - ${navigationHeight}px - ${footerHeight}px)`}
>
<Suspense fallback={<Loading />}>{children}</Suspense>
</Box>
<Footer />
</LayoutProvider>
</ChakraProvider>
</body>
</html>
);
}