fix: resolve merge conflict in pengaturan/route.tsx

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
This commit is contained in:
2026-03-13 14:41:22 +08:00
parent 17ecd3feca
commit a74e0c02e5

View File

@@ -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 (
<AppShell
header={{ height: 60 }}
@@ -60,19 +43,13 @@ function PengaturanLayout() {
padding="md"
>
<AppShell.Header bg={headerBgColor}>
<Group
h="100%"
px="lg"
align="center"
wrap="nowrap"
>
<Group h="100%" px="lg" align="center" wrap="nowrap">
<Burger
opened={opened}
onClick={toggle}
hiddenFrom="sm"
size="sm"
/>
<Header />
</Group>
</AppShell.Header>