Refactor: Implement logging and JSONB cleanup

This commit is contained in:
gpt-engineer-app[bot]
2025-11-03 18:05:58 +00:00
parent b6179372e6
commit e9b9faa3e1
18 changed files with 430 additions and 142 deletions

View File

@@ -3,6 +3,7 @@ import { useAuth } from '@/hooks/useAuth';
import { supabase } from '@/integrations/supabase/client';
import { useNavigate } from 'react-router-dom';
import { toast } from '@/hooks/use-toast';
import { logger } from '@/lib/logger';
export function useBanCheck() {
const { user } = useAuth();
@@ -56,7 +57,7 @@ export function useBanCheck() {
navigate('/');
}
} catch (error) {
console.error('Ban check error:', error);
logger.error('Ban check error', { error, userId: user.id });
} finally {
setLoading(false);
}