Files
site/apps/web/src/modules/auth/hooks/useIsSuperuser.ts
T
vlad 86cc3fa541 Update admin theme/layout and refresh README details.
Align the project baseline with the latest admin interface styling and layout structure while documenting setup and usage updates in README.
2026-07-14 17:12:28 +03:00

7 lines
214 B
TypeScript

import { useAuthStore } from "../store/authStore";
export function useIsSuperuser(): boolean {
const user = useAuthStore((state) => state.user);
return Boolean(user?.role === "admin" && user?.is_superuser);
}