upd: theme'

Deskripsi:
- color pallete
- crud
- change theme

No Issues
This commit is contained in:
amel
2024-09-13 17:16:15 +08:00
parent 2ecbd9d9d5
commit fb9b876a8e
14 changed files with 807 additions and 190 deletions

View File

@@ -1,16 +1,18 @@
'use client'
import { useHookstate } from "@hookstate/core";
import { globalRole } from "../bin/val_global";
import { globalRole, TEMA } from "../bin/val_global";
import { useShallowEffect } from "@mantine/hooks";
import { useEffect } from "react";
export default function WrapLayout({ children, role }: { children: React.ReactNode, role: any }) {
export default function WrapLayout({ children, role, theme }: { children: React.ReactNode, role: any, theme:any }) {
const roleLogin = useHookstate(globalRole)
const tema = useHookstate(TEMA)
useEffect(() => {
roleLogin.set(role)
tema.set(theme)
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [role])
}, [role, theme])
return (
<>
{children}