forked from cardosofelipe/fast-next-template
**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:
@@ -8,7 +8,7 @@
|
||||
|
||||
import { useEffect } from 'react';
|
||||
import { useRouter, usePathname } from 'next/navigation';
|
||||
import { useAuthStore } from '@/stores/authStore';
|
||||
import { useAuthStore } from '@/lib/stores/authStore';
|
||||
import { useMe } from '@/lib/api/hooks/useAuth';
|
||||
import config from '@/config/app.config';
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
'use client';
|
||||
|
||||
import { useEffect } from 'react';
|
||||
import { useAuthStore } from '@/stores/authStore';
|
||||
import { useAuthStore } from '@/lib/stores/authStore';
|
||||
|
||||
/**
|
||||
* AuthInitializer - Initializes auth state from encrypted storage on mount
|
||||
|
||||
@@ -1,8 +1,5 @@
|
||||
// Authentication components
|
||||
|
||||
// Initialization
|
||||
export { AuthInitializer } from './AuthInitializer';
|
||||
|
||||
// Route protection
|
||||
export { AuthGuard } from './AuthGuard';
|
||||
|
||||
|
||||
Reference in New Issue
Block a user