mirror of
https://gitlab.com/mbugroup/lti-web-client.git
synced 2026-05-25 07:45:47 +00:00
chore(FE-40): update import path and return isLoadingUser and setIsLoadingUser in useAuth
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
import { create } from 'zustand';
|
import { create } from 'zustand';
|
||||||
import { UserWithRoles } from '@/types/api';
|
import { UserWithRoles } from '@/types/api/api-general';
|
||||||
|
|
||||||
type AuthStore = {
|
type AuthStore = {
|
||||||
user?: UserWithRoles;
|
user?: UserWithRoles;
|
||||||
@@ -16,10 +16,12 @@ const useAuthStore = create<AuthStore>()((set) => ({
|
|||||||
}));
|
}));
|
||||||
|
|
||||||
export const useAuth = () => {
|
export const useAuth = () => {
|
||||||
const { user, setUser } = useAuthStore();
|
const { user, setUser, isLoadingUser, setIsLoadingUser } = useAuthStore();
|
||||||
|
|
||||||
return {
|
return {
|
||||||
user,
|
user,
|
||||||
setUser,
|
setUser,
|
||||||
|
isLoadingUser,
|
||||||
|
setIsLoadingUser,
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user