feat(app/dev/dashboard admin):
- membuat layout - membuat page
This commit is contained in:
64
src/app/dev/dashboard-admin/layout.tsx
Normal file
64
src/app/dev/dashboard-admin/layout.tsx
Normal file
@@ -0,0 +1,64 @@
|
|||||||
|
"use client";
|
||||||
|
import {
|
||||||
|
AppShell,
|
||||||
|
Box,
|
||||||
|
Burger,
|
||||||
|
Button,
|
||||||
|
Flex,
|
||||||
|
Group,
|
||||||
|
Header,
|
||||||
|
MediaQuery,
|
||||||
|
Menu,
|
||||||
|
Text,
|
||||||
|
useMantineTheme,
|
||||||
|
} from "@mantine/core";
|
||||||
|
import router from "next/router";
|
||||||
|
import { useState } from "react";
|
||||||
|
|
||||||
|
export default function LayoutDashboardAdmin({
|
||||||
|
children,
|
||||||
|
}: {
|
||||||
|
children: React.ReactNode;
|
||||||
|
}) {
|
||||||
|
const theme = useMantineTheme();
|
||||||
|
const [opened, setOpened] = useState(false);
|
||||||
|
|
||||||
|
return (
|
||||||
|
<>
|
||||||
|
<AppShell
|
||||||
|
styles={{
|
||||||
|
main: {
|
||||||
|
background:
|
||||||
|
theme.colorScheme === "dark"
|
||||||
|
? theme.colors.dark[8]
|
||||||
|
: theme.colors.gray[0],
|
||||||
|
},
|
||||||
|
}}
|
||||||
|
// navbarOffsetBreakpoint="sm"
|
||||||
|
// asideOffsetBreakpoint="sm"
|
||||||
|
header={
|
||||||
|
<Header height={{ base: 50, md: 70 }} p="md">
|
||||||
|
<div style={{ height: "100%" }}>
|
||||||
|
<MediaQuery largerThan="sm" styles={{ display: "none" }}>
|
||||||
|
<Burger
|
||||||
|
opened={opened}
|
||||||
|
onClick={() => setOpened((o) => !o)}
|
||||||
|
size="sm"
|
||||||
|
color={theme.colors.gray[6]}
|
||||||
|
mr="xl"
|
||||||
|
/>
|
||||||
|
</MediaQuery>
|
||||||
|
|
||||||
|
<Group position="apart">
|
||||||
|
<Text>Dashboard Admin</Text>
|
||||||
|
<Button>Admin</Button>
|
||||||
|
</Group>
|
||||||
|
</div>
|
||||||
|
</Header>
|
||||||
|
}
|
||||||
|
>
|
||||||
|
{children}
|
||||||
|
</AppShell>
|
||||||
|
</>
|
||||||
|
);
|
||||||
|
}
|
||||||
7
src/app/dev/dashboard-admin/page.tsx
Normal file
7
src/app/dev/dashboard-admin/page.tsx
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
import DashboardAdmin from "@/modules/dashboard_admin";
|
||||||
|
|
||||||
|
export default function PageDashboardAdmin(){
|
||||||
|
return <>
|
||||||
|
<DashboardAdmin/>
|
||||||
|
</>
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user