mirror of
https://github.com/pacnpal/thrilltrack-explorer.git
synced 2025-12-23 23:31:12 -05:00
Fix console statement violations
This commit is contained in:
@@ -134,7 +134,7 @@ export function useModerationFilters(
|
||||
return JSON.parse(saved);
|
||||
}
|
||||
} catch (error: unknown) {
|
||||
console.error('Failed to load persisted filters:', error);
|
||||
logger.warn('Failed to load persisted filters', { error, storageKey });
|
||||
}
|
||||
|
||||
return null;
|
||||
@@ -153,7 +153,7 @@ export function useModerationFilters(
|
||||
}
|
||||
}
|
||||
} catch (error: unknown) {
|
||||
console.error('Failed to load persisted sort:', error);
|
||||
logger.warn('Failed to load persisted sort', { error, storageKey });
|
||||
}
|
||||
|
||||
return initialSortConfig;
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
import { useState, useCallback, useEffect, useMemo } from 'react';
|
||||
import { MODERATION_CONSTANTS } from '@/lib/moderation/constants';
|
||||
import * as storage from '@/lib/localStorage';
|
||||
import { logger } from '@/lib/logger';
|
||||
|
||||
export interface PaginationConfig {
|
||||
/** Initial page number (1-indexed) */
|
||||
@@ -123,7 +124,7 @@ export function usePagination(config: PaginationConfig = {}): PaginationState {
|
||||
return JSON.parse(saved);
|
||||
}
|
||||
} catch (error: unknown) {
|
||||
console.error('Failed to load pagination state:', error);
|
||||
logger.warn('Failed to load pagination state', { error, storageKey });
|
||||
}
|
||||
|
||||
return null;
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user