diff --git a/src/app/admin/layout.tsx b/src/app/admin/layout.tsx new file mode 100644 index 0000000..70f87d1 --- /dev/null +++ b/src/app/admin/layout.tsx @@ -0,0 +1,41 @@ +"use client"; +import { ActionIcon, AppShell, Burger, Flex, Group, Skeleton, useMantineColorScheme } from "@mantine/core"; +import { useDisclosure } from "@mantine/hooks"; +import { LuMoon, LuSun } from "react-icons/lu"; + +const AdminLayout = ({ + children, +}: Readonly<{ + children: React.ReactNode; +}>) => { + const [opened, { toggle }] = useDisclosure(); + const { setColorScheme, colorScheme } = useMantineColorScheme(); + const changeColorScheme = () => { + setColorScheme(colorScheme === "light" ? "dark" : "light"); + }; + return ( + + + + + +
Logo
+
+ + {colorScheme === "light" ? : } + +
+
+ + {Array(15) + .fill(0) + .map((_, index) => ( + + ))} + + {children} +
+ ); +}; + +export default AdminLayout; diff --git a/src/app/admin/panel/page.tsx b/src/app/admin/panel/page.tsx index 1c45171..a25ebaa 100644 --- a/src/app/admin/panel/page.tsx +++ b/src/app/admin/panel/page.tsx @@ -1,35 +1,6 @@ "use client"; -import { ActionIcon, AppShell, Burger, Flex, Group, Skeleton, useMantineColorScheme } from "@mantine/core"; -import { useDisclosure } from "@mantine/hooks"; -import { LuMoon, LuSun } from "react-icons/lu"; const PanelPage = () => { - const [opened, { toggle }] = useDisclosure(); - const { setColorScheme, colorScheme } = useMantineColorScheme(); - const changeColorScheme = () => { - setColorScheme(colorScheme === "light" ? "dark" : "light"); - }; - return ( - - - - - -
Logo
-
- - {colorScheme === "light" ? : } - -
-
- - {Array(15) - .fill(0) - .map((_, index) => ( - - ))} - -
- ); + return
Panel
; }; export default PanelPage;