**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:
@@ -28,7 +28,7 @@ let refreshPromise: Promise<string> | null = null;
|
||||
* Dynamically imported to avoid circular dependencies
|
||||
*/
|
||||
const getAuthStore = async () => {
|
||||
const { useAuthStore } = await import('@/stores/authStore');
|
||||
const { useAuthStore } = await import('@/lib/stores/authStore');
|
||||
return useAuthStore.getState();
|
||||
};
|
||||
|
||||
|
||||
@@ -20,8 +20,8 @@ import {
|
||||
confirmPasswordReset,
|
||||
changeCurrentUserPassword,
|
||||
} from '../client';
|
||||
import { useAuthStore } from '@/stores/authStore';
|
||||
import type { User } from '@/stores/authStore';
|
||||
import { useAuthStore } from '@/lib/stores/authStore';
|
||||
import type { User } from '@/lib/stores/authStore';
|
||||
import { parseAPIError, getGeneralError } from '../errors';
|
||||
import { isTokenWithUser } from '../types';
|
||||
import config from '@/config/app.config';
|
||||
|
||||
Reference in New Issue
Block a user