**Authentication Refactor:** Remove authStore and its associated tests, transitioning to the new authentication model. Add dynamic loading for PasswordResetConfirmForm to optimize performance. Include a theme initialization script in layout.tsx to prevent FOUC.
This commit is contained in:
@@ -3,7 +3,6 @@
|
||||
import { QueryClient, QueryClientProvider } from '@tanstack/react-query';
|
||||
import { ReactQueryDevtools } from '@tanstack/react-query-devtools';
|
||||
import { useState } from 'react';
|
||||
import { AuthInitializer } from '@/components/auth';
|
||||
import { ThemeProvider } from '@/components/theme';
|
||||
|
||||
export function Providers({ children }: { children: React.ReactNode }) {
|
||||
@@ -14,7 +13,8 @@ export function Providers({ children }: { children: React.ReactNode }) {
|
||||
queries: {
|
||||
staleTime: 60 * 1000, // 1 minute
|
||||
retry: 1,
|
||||
refetchOnWindowFocus: true,
|
||||
refetchOnWindowFocus: false, // Disabled - use selective refetching per query
|
||||
refetchOnReconnect: true, // Keep for session data
|
||||
},
|
||||
mutations: {
|
||||
retry: false,
|
||||
@@ -26,7 +26,7 @@ export function Providers({ children }: { children: React.ReactNode }) {
|
||||
return (
|
||||
<ThemeProvider>
|
||||
<QueryClientProvider client={queryClient}>
|
||||
<AuthInitializer />
|
||||
{/* AuthInitializer removed - Zustand persist middleware handles auto-hydration */}
|
||||
{children}
|
||||
<ReactQueryDevtools initialIsOpen={false} />
|
||||
</QueryClientProvider>
|
||||
|
||||
Reference in New Issue
Block a user