fix: resolve merge conflict in pengaturan/route.tsx
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
This commit is contained in:
@@ -1,19 +1,12 @@
|
|||||||
<<<<<<< HEAD:src/routes/dashboard/route.tsx
|
|
||||||
import {
|
import {
|
||||||
AppShell,
|
AppShell,
|
||||||
Burger,
|
Burger,
|
||||||
Group,
|
Group,
|
||||||
useMantineColorScheme,
|
useMantineColorScheme,
|
||||||
useMantineTheme,
|
|
||||||
} from "@mantine/core";
|
} from "@mantine/core";
|
||||||
import { useDisclosure, useMediaQuery } from "@mantine/hooks";
|
import { useDisclosure, useMediaQuery } from "@mantine/hooks";
|
||||||
import { createFileRoute, Outlet, useRouterState } from "@tanstack/react-router";
|
import { createFileRoute, Outlet, useRouterState } from "@tanstack/react-router";
|
||||||
import { useEffect } from "react";
|
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 { Header } from "@/components/header";
|
||||||
import { Sidebar } from "@/components/sidebar";
|
import { Sidebar } from "@/components/sidebar";
|
||||||
|
|
||||||
@@ -21,34 +14,24 @@ export const Route = createFileRoute("/pengaturan")({
|
|||||||
component: PengaturanLayout,
|
component: PengaturanLayout,
|
||||||
});
|
});
|
||||||
|
|
||||||
<<<<<<< HEAD:src/routes/dashboard/route.tsx
|
function PengaturanLayout() {
|
||||||
function RouteComponent() {
|
|
||||||
const [opened, { toggle, close }] = useDisclosure();
|
const [opened, { toggle, close }] = useDisclosure();
|
||||||
const { colorScheme } = useMantineColorScheme();
|
const { colorScheme } = useMantineColorScheme();
|
||||||
const theme = useMantineTheme();
|
|
||||||
const routerState = useRouterState();
|
|
||||||
|
|
||||||
const isMobile = useMediaQuery("(max-width: 48em)");
|
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 headerBgColor = colorScheme === "dark" ? "#11192D" : "#19355E";
|
||||||
const navbarBgColor = colorScheme === "dark" ? "#11192D" : "white";
|
const navbarBgColor = colorScheme === "dark" ? "#11192D" : "white";
|
||||||
const mainBgColor = colorScheme === "dark" ? "#11192D" : "#edf3f8ff";
|
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(() => {
|
useEffect(() => {
|
||||||
if (isMobile && opened) {
|
if (isMobile && opened) {
|
||||||
close();
|
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 (
|
return (
|
||||||
<AppShell
|
<AppShell
|
||||||
header={{ height: 60 }}
|
header={{ height: 60 }}
|
||||||
@@ -60,19 +43,13 @@ function PengaturanLayout() {
|
|||||||
padding="md"
|
padding="md"
|
||||||
>
|
>
|
||||||
<AppShell.Header bg={headerBgColor}>
|
<AppShell.Header bg={headerBgColor}>
|
||||||
<Group
|
<Group h="100%" px="lg" align="center" wrap="nowrap">
|
||||||
h="100%"
|
|
||||||
px="lg"
|
|
||||||
align="center"
|
|
||||||
wrap="nowrap"
|
|
||||||
>
|
|
||||||
<Burger
|
<Burger
|
||||||
opened={opened}
|
opened={opened}
|
||||||
onClick={toggle}
|
onClick={toggle}
|
||||||
hiddenFrom="sm"
|
hiddenFrom="sm"
|
||||||
size="sm"
|
size="sm"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<Header />
|
<Header />
|
||||||
</Group>
|
</Group>
|
||||||
</AppShell.Header>
|
</AppShell.Header>
|
||||||
|
|||||||
Reference in New Issue
Block a user