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

@@ -20,6 +20,7 @@ import { Dialog, DialogContent, DialogDescription, DialogHeader, DialogTitle } f
import { Combobox } from '@/components/ui/combobox';
import { SlugField } from '@/components/ui/slug-field';
import { toast } from '@/hooks/use-toast';
import { getErrorMessage } from '@/lib/errorHandler';
import { Plus, Zap, Save, X } from 'lucide-react';
import { toDateOnly } from '@/lib/dateUtils';
import { useUnitPreferences } from '@/hooks/useUnitPreferences';
@@ -263,10 +264,11 @@ export function RideForm({ onSubmit, onCancel, initialData, isEditing = false }:
? "Ride, manufacturer, and model submitted for review"
: "Ride submitted for review"
});
} catch (error: any) {
} catch (error) {
const errorMsg = getErrorMessage(error);
toast({
title: "Error",
description: error.message || "Failed to save ride information.",
description: errorMsg,
variant: "destructive"
});
} finally {