upd: pembatasan user

Deskripsi:
- menyimpan role pada variable global
- pembatasan pada position
- pembatasan pada fitur home
- memasang log user pada position

No Issues
This commit is contained in:
amel
2024-09-04 14:11:49 +08:00
parent 878294e063
commit 19f94879d0
12 changed files with 189 additions and 138 deletions

View File

@@ -0,0 +1,17 @@
'use client'
import { useHookstate } from "@hookstate/core";
import { globalRole } from "../bin/val_global";
import { useShallowEffect } from "@mantine/hooks";
export default function WrapLayout({ children, role }: { children: React.ReactNode, role: any }) {
const roleLogin = useHookstate(globalRole)
useShallowEffect(() => {
roleLogin.set(role)
}, [])
return (
<>
{children}
</>
);
}