mirror of
https://github.com/pacnpal/thrilltrack-explorer.git
synced 2025-12-22 18:51:13 -05:00
Implement type safety and JSONB elimination
This commit is contained in:
@@ -3,6 +3,7 @@ import { Upload } from 'lucide-react';
|
||||
import { Button } from '@/components/ui/button';
|
||||
import { Input } from '@/components/ui/input';
|
||||
import { useToast } from '@/hooks/use-toast';
|
||||
import { getErrorMessage } from '@/lib/errorHandler';
|
||||
|
||||
interface SimplePhotoUploadProps {
|
||||
onUpload: (imageId: string, imageUrl: string) => Promise<void>;
|
||||
@@ -48,10 +49,10 @@ export function SimplePhotoUpload({ onUpload, disabled, children }: SimplePhotoU
|
||||
title: 'Image uploaded',
|
||||
description: 'Your image has been uploaded successfully'
|
||||
});
|
||||
} catch (error: any) {
|
||||
} catch (error) {
|
||||
toast({
|
||||
title: 'Upload failed',
|
||||
description: error.message || 'Failed to upload image',
|
||||
description: getErrorMessage(error),
|
||||
variant: 'destructive'
|
||||
});
|
||||
} finally {
|
||||
|
||||
Reference in New Issue
Block a user