diff --git a/src/routes/pengaturan/route.tsx b/src/routes/pengaturan/route.tsx index fa94cf4..d82dfdb 100644 --- a/src/routes/pengaturan/route.tsx +++ b/src/routes/pengaturan/route.tsx @@ -1,19 +1,12 @@ -<<<<<<< HEAD:src/routes/dashboard/route.tsx import { AppShell, Burger, Group, useMantineColorScheme, - useMantineTheme, } from "@mantine/core"; import { useDisclosure, useMediaQuery } from "@mantine/hooks"; import { createFileRoute, Outlet, useRouterState } from "@tanstack/react-router"; import { useEffect } from "react"; -======= -import { AppShell, Burger, Group, useMantineColorScheme } from "@mantine/core"; -import { useDisclosure } from "@mantine/hooks"; -import { createFileRoute, Outlet } from "@tanstack/react-router"; ->>>>>>> 89c8ca8 (fix: make dashboard public and remove admin-only restriction from main pages):src/routes/pengaturan/route.tsx import { Header } from "@/components/header"; import { Sidebar } from "@/components/sidebar"; @@ -21,34 +14,24 @@ export const Route = createFileRoute("/pengaturan")({ component: PengaturanLayout, }); -<<<<<<< HEAD:src/routes/dashboard/route.tsx -function RouteComponent() { +function PengaturanLayout() { const [opened, { toggle, close }] = useDisclosure(); const { colorScheme } = useMantineColorScheme(); - const theme = useMantineTheme(); - const routerState = useRouterState(); const isMobile = useMediaQuery("(max-width: 48em)"); + const routerState = useRouterState(); -======= -function PengaturanLayout() { - const [opened, { toggle }] = useDisclosure(); - const { colorScheme } = useMantineColorScheme(); ->>>>>>> 89c8ca8 (fix: make dashboard public and remove admin-only restriction from main pages):src/routes/pengaturan/route.tsx const headerBgColor = colorScheme === "dark" ? "#11192D" : "#19355E"; const navbarBgColor = colorScheme === "dark" ? "#11192D" : "white"; const mainBgColor = colorScheme === "dark" ? "#11192D" : "#edf3f8ff"; -<<<<<<< HEAD:src/routes/dashboard/route.tsx - // ✅ AUTO CLOSE NAVBAR ON ROUTE CHANGE (MOBILE ONLY) + // Auto close navbar on route change (mobile only) useEffect(() => { if (isMobile && opened) { close(); } - }, [routerState.location.pathname]); + }, [routerState.location.pathname, isMobile, opened, close]); -======= ->>>>>>> 89c8ca8 (fix: make dashboard public and remove admin-only restriction from main pages):src/routes/pengaturan/route.tsx return ( - + -