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

@@ -3,6 +3,7 @@ import { supabase } from '@/integrations/supabase/client';
import { PhotoGrid } from '@/components/common/PhotoGrid';
import type { PhotoSubmissionItem } from '@/types/photo-submissions';
import type { PhotoItem } from '@/types/photos';
import { getErrorMessage } from '@/lib/errorHandler';
interface PhotoSubmissionDisplayProps {
submissionId: string;
@@ -81,10 +82,11 @@ export function PhotoSubmissionDisplay({ submissionId }: PhotoSubmissionDisplayP
setPhotos(data || []);
console.log(`✅ Successfully loaded ${data?.length || 0} photos`);
} catch (error: any) {
console.error('❌ PhotoSubmissionDisplay error:', error);
} catch (error) {
const errorMsg = getErrorMessage(error);
console.error('❌ PhotoSubmissionDisplay error:', errorMsg);
setPhotos([]);
setError(error.message || 'Failed to load photos');
setError(errorMsg);
} finally {
setLoading(false);
}