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:
copilot-swe-agent[bot]
2026-03-24 00:53:20 +00:00
parent b253c64090
commit d2878f8ef6
4 changed files with 22 additions and 6 deletions
+1 -1
View File
@@ -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,