Fix console statement violations

This commit is contained in:
gpt-engineer-app[bot]
2025-11-03 18:30:07 +00:00
parent e9b9faa3e1
commit 7eb0b77d76
10 changed files with 31 additions and 27 deletions

View File

@@ -7,6 +7,7 @@ import { authLog, authWarn, authError } from '@/lib/authLogger';
import type { AALLevel, CheckAalResult } from '@/types/auth';
import { getSessionAal, checkAalStepUp as checkAalStepUpService, signOutUser } from '@/lib/authService';
import { clearAllAuthFlags } from '@/lib/sessionFlags';
import { logger } from '@/lib/logger';
interface AuthContextType {
user: User | null;
@@ -256,7 +257,7 @@ export const AuthProvider = AuthProviderComponent;
export function useAuth() {
const context = useContext(AuthContext);
if (context === undefined) {
console.error('[useAuth] AuthContext is undefined - component may be rendering outside AuthProvider');
logger.error('AuthContext is undefined - component may be rendering outside AuthProvider', { component: 'useAuth' });
throw new Error('useAuth must be used within an AuthProvider');
}
return context;