mirror of
https://github.com/pacnpal/thrilltrack-explorer.git
synced 2025-12-24 20:31:12 -05:00
Fix: Approve database migration
This commit is contained in:
@@ -7,6 +7,7 @@ import { UserX } from 'lucide-react';
|
||||
import { supabase } from '@/integrations/supabase/client';
|
||||
import { useAuth } from '@/hooks/useAuth';
|
||||
import { useToast } from '@/hooks/use-toast';
|
||||
import { getErrorMessage } from '@/lib/errorHandler';
|
||||
|
||||
interface UserBlockButtonProps {
|
||||
targetUserId: string;
|
||||
@@ -42,8 +43,9 @@ export function UserBlockButton({ targetUserId, targetUsername, variant = 'outli
|
||||
});
|
||||
|
||||
setReason('');
|
||||
} catch (error: any) {
|
||||
console.error('Error blocking user:', error);
|
||||
} catch (error) {
|
||||
const errorMsg = getErrorMessage(error);
|
||||
console.error('Error blocking user:', errorMsg);
|
||||
toast({
|
||||
title: 'Error',
|
||||
description: 'Failed to block user',
|
||||
|
||||
Reference in New Issue
Block a user