Implement type safety and JSONB elimination

This commit is contained in:
gpt-engineer-app[bot]
2025-10-17 13:29:22 +00:00
parent efc33a7dda
commit d54b8a9ae4
10 changed files with 144 additions and 69 deletions

View File

@@ -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 {