feat: Implement final type safety fixes

This commit is contained in:
gpt-engineer-app[bot]
2025-10-17 15:06:35 +00:00
parent 5466c60b84
commit 77deb62742
13 changed files with 85 additions and 33 deletions

View File

@@ -14,6 +14,7 @@ import { supabase } from '@/integrations/supabase/client';
import { useAuth } from '@/hooks/useAuth';
import { useUserRole } from '@/hooks/useUserRole';
import { toast } from '@/hooks/use-toast';
import { getErrorMessage } from '@/lib/errorHandler';
import { useAuthModal } from '@/hooks/useAuthModal';
export default function Rides() {
@@ -89,10 +90,11 @@ export default function Rides() {
});
setIsCreateModalOpen(false);
} catch (error: any) {
} catch (error) {
const errorMsg = getErrorMessage(error);
toast({
title: "Submission Failed",
description: error.message || "Failed to submit ride.",
description: errorMsg || "Failed to submit ride.",
variant: "destructive"
});
}