mirror of
https://github.com/pacnpal/thrilltrack-explorer.git
synced 2025-12-20 08:11:13 -05:00
feat: Implement final type safety fixes
This commit is contained in:
@@ -14,6 +14,7 @@ import { getCloudflareImageUrl } from '@/lib/cloudflareImageUtils';
|
||||
import { useAuthModal } from '@/hooks/useAuthModal';
|
||||
import { useAuth } from '@/hooks/useAuth';
|
||||
import { toast } from '@/hooks/use-toast';
|
||||
import { getErrorMessage } from '@/lib/errorHandler';
|
||||
import { RideModelForm } from '@/components/admin/RideModelForm';
|
||||
import { ManufacturerPhotoGallery } from '@/components/companies/ManufacturerPhotoGallery';
|
||||
import { VersionIndicator } from '@/components/versioning/VersionIndicator';
|
||||
@@ -120,10 +121,11 @@ export default function RideModelDetail() {
|
||||
|
||||
setIsEditModalOpen(false);
|
||||
fetchData();
|
||||
} catch (error: any) {
|
||||
} catch (error) {
|
||||
const errorMsg = getErrorMessage(error);
|
||||
toast({
|
||||
title: "Error",
|
||||
description: error.message || "Failed to update ride model.",
|
||||
description: errorMsg || "Failed to update ride model.",
|
||||
variant: "destructive"
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user