mirror of
https://github.com/pacnpal/thrilltrack-explorer.git
synced 2025-12-20 11:51:14 -05:00
feat: Execute production readiness plan
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user