mirror of
https://github.com/pacnpal/thrilltrack-explorer.git
synced 2025-12-21 03:31:12 -05:00
Fix type errors in admin components
This commit is contained in:
@@ -9,10 +9,10 @@ import { supabase } from '@/integrations/supabase/client';
|
||||
import { format } from 'date-fns';
|
||||
|
||||
interface DuplicateStats {
|
||||
date: string;
|
||||
total_attempts: number;
|
||||
duplicates_prevented: number;
|
||||
prevention_rate: number;
|
||||
date: string | null;
|
||||
total_attempts: number | null;
|
||||
duplicates_prevented: number | null;
|
||||
prevention_rate: number | null;
|
||||
health_status: 'healthy' | 'warning' | 'critical';
|
||||
}
|
||||
|
||||
@@ -20,11 +20,11 @@ interface RecentDuplicate {
|
||||
id: string;
|
||||
user_id: string;
|
||||
channel: string;
|
||||
idempotency_key: string;
|
||||
idempotency_key: string | null;
|
||||
created_at: string;
|
||||
profiles?: {
|
||||
username: string;
|
||||
display_name: string;
|
||||
display_name: string | null;
|
||||
};
|
||||
}
|
||||
|
||||
@@ -165,11 +165,11 @@ export function NotificationDebugPanel() {
|
||||
</TableHeader>
|
||||
<TableBody>
|
||||
{stats.map((stat) => (
|
||||
<TableRow key={stat.date}>
|
||||
<TableCell>{format(new Date(stat.date), 'MMM d, yyyy')}</TableCell>
|
||||
<TableCell className="text-right">{stat.total_attempts}</TableCell>
|
||||
<TableCell className="text-right">{stat.duplicates_prevented}</TableCell>
|
||||
<TableCell className="text-right">{stat.prevention_rate.toFixed(1)}%</TableCell>
|
||||
<TableRow key={stat.date || 'unknown'}>
|
||||
<TableCell>{stat.date ? format(new Date(stat.date), 'MMM d, yyyy') : 'N/A'}</TableCell>
|
||||
<TableCell className="text-right">{stat.total_attempts ?? 0}</TableCell>
|
||||
<TableCell className="text-right">{stat.duplicates_prevented ?? 0}</TableCell>
|
||||
<TableCell className="text-right">{stat.prevention_rate !== null ? stat.prevention_rate.toFixed(1) : 'N/A'}%</TableCell>
|
||||
<TableCell>{getHealthBadge(stat.health_status)}</TableCell>
|
||||
</TableRow>
|
||||
))}
|
||||
|
||||
Reference in New Issue
Block a user