feat: Execute production readiness plan

This commit is contained in:
gpt-engineer-app[bot]
2025-10-20 13:41:54 +00:00
parent 368b97da04
commit 7f425ecb94
10 changed files with 108 additions and 141 deletions

View File

@@ -18,8 +18,8 @@ import {
SelectValue,
} from '@/components/ui/select';
import { supabase } from '@/integrations/supabase/client';
import { useToast } from '@/hooks/use-toast';
import { getErrorMessage } from '@/lib/errorHandler';
import { handleError } from '@/lib/errorHandler';
import { logger } from '@/lib/logger';
interface Moderator {
user_id: string;
@@ -45,7 +45,6 @@ export function ReassignDialog({
const [moderators, setModerators] = useState<Moderator[]>([]);
const [isSubmitting, setIsSubmitting] = useState(false);
const [loading, setLoading] = useState(true);
const { toast } = useToast();
useEffect(() => {
if (open) {
@@ -88,13 +87,10 @@ export function ReassignDialog({
});
setModerators(moderatorsList);
} catch (error) {
const errorMsg = getErrorMessage(error);
console.error('Error fetching moderators:', errorMsg);
toast({
title: 'Error',
description: 'Failed to load moderators list',
variant: 'destructive',
} catch (error: unknown) {
handleError(error, {
action: 'Load Moderators List',
metadata: { submissionType }
});
} finally {
setLoading(false);