chore(FE-40): update import path and return isLoadingUser and setIsLoadingUser in useAuth

This commit is contained in:
ValdiANS
2025-10-01 14:07:30 +07:00
parent 05886896f1
commit 3d3df42576
+4 -2
View File
@@ -1,5 +1,5 @@
import { create } from 'zustand';
import { UserWithRoles } from '@/types/api';
import { UserWithRoles } from '@/types/api/api-general';
type AuthStore = {
user?: UserWithRoles;
@@ -16,10 +16,12 @@ const useAuthStore = create<AuthStore>()((set) => ({
}));
export const useAuth = () => {
const { user, setUser } = useAuthStore();
const { user, setUser, isLoadingUser, setIsLoadingUser } = useAuthStore();
return {
user,
setUser,
isLoadingUser,
setIsLoadingUser,
};
};