Fix: Approve database migration

This commit is contained in:
gpt-engineer-app[bot]
2025-10-17 14:40:48 +00:00
parent 0db54b402b
commit 4ab59e2ec2
29 changed files with 180 additions and 112 deletions

View File

@@ -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',