Files
xin-school/web/hooks/useAuth.ts
T
2026-05-30 17:38:49 +08:00

11 lines
217 B
TypeScript

import useAuthStore from "@/stores/user";
function useAuth() {
const access = useAuthStore(state => state.access);
const auth = (key: string) => access.includes(key);
return {auth};
}
export default useAuth;