@@ -35,7 +35,6 @@ interface AuthState {
|
||||
refreshToken: string | null;
|
||||
isAuthenticated: boolean;
|
||||
loading: boolean;
|
||||
_hasHydrated: boolean; // Track if persist has completed rehydration
|
||||
|
||||
// Actions
|
||||
login: (email: string, password: string) => Promise<void>;
|
||||
@@ -45,7 +44,6 @@ interface AuthState {
|
||||
setToken: (token: string | null) => void;
|
||||
refreshToken: () => Promise<void>;
|
||||
refreshUser: () => Promise<void>;
|
||||
setHasHydrated: (hasHydrated: boolean) => void;
|
||||
}
|
||||
|
||||
export const useAuthStore = create<AuthState>()(
|
||||
@@ -55,7 +53,6 @@ export const useAuthStore = create<AuthState>()(
|
||||
token: null,
|
||||
isAuthenticated: false,
|
||||
loading: false, // Always start with loading false - will be set true only during login/register
|
||||
_hasHydrated: false, // Will be set to true after persist rehydration completes
|
||||
|
||||
login: async (email, password) => {
|
||||
set({ loading: true });
|
||||
|
||||
Reference in New Issue
Block a user