fix: infinite spinner – init isLoading from token presence and add home-page auth check
Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com> Agent-Logs-Url: https://github.com/christianlouis/pop_puller_to_gmail/sessions/b032c6bb-aa8c-491d-91f5-289c69e67b95
This commit is contained in:
@@ -16,7 +16,7 @@ export const useAuthStore = create<AuthState>((set) => ({
|
||||
user: null,
|
||||
token: typeof window !== 'undefined' ? localStorage.getItem('access_token') : null,
|
||||
isAuthenticated: typeof window !== 'undefined' ? !!localStorage.getItem('access_token') : false,
|
||||
isLoading: true,
|
||||
isLoading: typeof window !== 'undefined' ? !!localStorage.getItem('access_token') : false,
|
||||
|
||||
setUser: (user) => set({
|
||||
user,
|
||||
|
||||
Reference in New Issue
Block a user