mirror of
https://github.com/pacnpal/thrilltrack-explorer.git
synced 2025-12-23 21:11:13 -05:00
Fix: Approve database migration
This commit is contained in:
@@ -13,6 +13,7 @@ import {
|
||||
FileImage
|
||||
} from 'lucide-react';
|
||||
import { cn } from '@/lib/utils';
|
||||
import { getErrorMessage } from '@/lib/errorHandler';
|
||||
import { supabase } from '@/integrations/supabase/client';
|
||||
|
||||
interface PhotoUploadProps {
|
||||
@@ -266,11 +267,11 @@ export function PhotoUpload({
|
||||
}
|
||||
|
||||
setUploadProgress(100);
|
||||
} catch (error: any) {
|
||||
} catch (error) {
|
||||
previewUrls.forEach(url => revokeObjectUrl(url));
|
||||
const errorMessage = error.message || 'Upload failed';
|
||||
setError(errorMessage);
|
||||
onError?.(errorMessage);
|
||||
const errorMsg = getErrorMessage(error);
|
||||
setError(errorMsg);
|
||||
onError?.(errorMsg);
|
||||
} finally {
|
||||
setUploading(false);
|
||||
setUploadProgress(0);
|
||||
|
||||
Reference in New Issue
Block a user