mirror of
https://github.com/pacnpal/thrilltrack-explorer.git
synced 2025-12-21 07:31:13 -05:00
Refactor: Implement logging and JSONB cleanup
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user