mirror of
https://github.com/pacnpal/thrilltrack-explorer.git
synced 2025-12-23 14:31:13 -05:00
Fix: Resolve type incompatibility in company person_type
This commit is contained in:
@@ -6,7 +6,7 @@ import { Badge } from '@/components/ui/badge';
|
||||
import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from '@/components/ui/select';
|
||||
import { Dialog, DialogContent } from '@/components/ui/dialog';
|
||||
import { ArrowLeft, Filter, SlidersHorizontal, FerrisWheel, Plus } from 'lucide-react';
|
||||
import { RideModel, Company } from '@/types/database';
|
||||
import { RideModel, Company, Park } from '@/types/database';
|
||||
import { RideModelSubmissionData } from '@/types/submission-data';
|
||||
import { supabase } from '@/integrations/supabase/client';
|
||||
import { RideModelCard } from '@/components/rides/RideModelCard';
|
||||
@@ -16,6 +16,10 @@ import { useAuth } from '@/hooks/useAuth';
|
||||
import { toast } from '@/hooks/use-toast';
|
||||
import { useAuthModal } from '@/hooks/useAuthModal';
|
||||
|
||||
interface RideModelWithCount extends RideModel {
|
||||
ride_count: number;
|
||||
}
|
||||
|
||||
export default function ManufacturerModels() {
|
||||
const { manufacturerSlug } = useParams<{ manufacturerSlug: string }>();
|
||||
const navigate = useNavigate();
|
||||
@@ -71,7 +75,7 @@ export default function ManufacturerModels() {
|
||||
const modelsWithCounts: RideModelWithCount[] = (modelsData || []).map(model => ({
|
||||
...model,
|
||||
ride_count: Array.isArray(model.rides) ? model.rides[0]?.count || 0 : 0
|
||||
}));
|
||||
})) as RideModelWithCount[];
|
||||
|
||||
setModels(modelsWithCounts);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user