fix Layout
This commit is contained in:
@@ -1,30 +1,25 @@
|
|||||||
"use client";
|
"use client";
|
||||||
|
|
||||||
import colors from "@/con/colors";
|
import colors from "@/con/colors";
|
||||||
import { MantineProvider, createTheme } from "@mantine/core";
|
|
||||||
import { Box, Space, Stack } from "@mantine/core";
|
import { Box, Space, Stack } from "@mantine/core";
|
||||||
|
|
||||||
import { Navbar } from "@/app/darmasaba/_com/Navbar";
|
import { Navbar } from "@/app/darmasaba/_com/Navbar";
|
||||||
import Footer from "./_com/Footer";
|
import Footer from "./_com/Footer";
|
||||||
|
|
||||||
const theme = createTheme({});
|
|
||||||
|
|
||||||
export default function Layout({ children }: { children: React.ReactNode }) {
|
export default function Layout({ children }: { children: React.ReactNode }) {
|
||||||
return (
|
return (
|
||||||
<MantineProvider theme={theme} defaultColorScheme="light">
|
<Stack gap={0} bg={colors.grey[1]}>
|
||||||
<Stack gap={0} bg={colors.grey[1]}>
|
<Navbar />
|
||||||
<Navbar />
|
<Space h={{
|
||||||
<Space h={{
|
base: "3.9rem",
|
||||||
base: "3.9rem",
|
md: "2.5rem"
|
||||||
md: "2.5rem"
|
}} />
|
||||||
}} />
|
<Box style={{
|
||||||
<Box style={{
|
overflow: "scroll"
|
||||||
overflow: "scroll"
|
}}>
|
||||||
}}>
|
{children}
|
||||||
{children}
|
</Box>
|
||||||
</Box>
|
<Footer />
|
||||||
<Footer />
|
</Stack>
|
||||||
</Stack>
|
|
||||||
</MantineProvider>
|
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
@@ -96,22 +96,24 @@ export default function RootLayout({
|
|||||||
return (
|
return (
|
||||||
<ViewTransitions>
|
<ViewTransitions>
|
||||||
<html lang="id" {...mantineHtmlProps}>
|
<html lang="id" {...mantineHtmlProps}>
|
||||||
<head>
|
<head>
|
||||||
<meta charSet="utf-8" />
|
<ColorSchemeScript defaultColorScheme="light" />
|
||||||
<ColorSchemeScript />
|
</head>
|
||||||
</head>
|
<body>
|
||||||
<body>
|
<MantineProvider
|
||||||
<MantineProvider theme={theme}>
|
theme={theme}
|
||||||
{children}
|
defaultColorScheme="light"
|
||||||
<LoadDataFirstClient />
|
>
|
||||||
<ToastContainer
|
{children}
|
||||||
position="bottom-center"
|
<LoadDataFirstClient />
|
||||||
hideProgressBar
|
<ToastContainer
|
||||||
style={{ zIndex: 9999 }}
|
position="bottom-center"
|
||||||
/>
|
hideProgressBar
|
||||||
</MantineProvider>
|
style={{ zIndex: 9999 }}
|
||||||
</body>
|
/>
|
||||||
</html>
|
</MantineProvider>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
</ViewTransitions>
|
</ViewTransitions>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user