Fix: Standardize card fields for consistency

This commit is contained in:
gpt-engineer-app[bot]
2025-10-17 22:29:05 +00:00
parent ebd0f0fd56
commit 8f47dd899f
7 changed files with 88 additions and 79 deletions

View File

@@ -93,10 +93,12 @@ export function RideCard({ ride, showParkName = true, className, parkSlug }: Rid
</h3>
{showParkName && ride.park?.name && (
<div className="flex items-center text-sm text-muted-foreground">
<MapPin className="w-3 h-3 mr-1" />
{ride.park.name}
{ride.park.location?.city && `, ${ride.park.location.city}`}
<div className="flex items-center gap-1 text-sm text-muted-foreground">
<MapPin className="w-3 h-3" />
<span className="truncate">
{ride.park.name}
{ride.park.location?.city && `, ${ride.park.location.city}`}
</span>
</div>
)}
</div>

View File

@@ -1,6 +1,5 @@
import { Card, CardContent } from '@/components/ui/card';
import { Badge } from '@/components/ui/badge';
import { Button } from '@/components/ui/button';
import { FerrisWheel } from 'lucide-react';
import { RideModel } from '@/types/database';
import { useNavigate } from 'react-router-dom';
@@ -40,7 +39,10 @@ export function RideModelCard({ model, manufacturerSlug }: RideModelCardProps) {
const cardImageId = extendedModel.card_image_id;
return (
<Card className="overflow-hidden hover:shadow-lg transition-shadow cursor-pointer group">
<Card
className="overflow-hidden hover:shadow-lg transition-shadow cursor-pointer group"
onClick={() => navigate(`/manufacturers/${manufacturerSlug}/models/${model.slug}`)}
>
<div
className="aspect-[3/2] bg-gradient-to-br from-primary/10 via-secondary/10 to-accent/10 relative overflow-hidden"
>
@@ -77,17 +79,8 @@ export function RideModelCard({ model, manufacturerSlug }: RideModelCardProps) {
</Badge>
</div>
<div className="pt-2 flex items-center justify-between">
<span className="text-sm text-muted-foreground">
{rideCount} {rideCount === 1 ? 'ride' : 'rides'}
</span>
<Button
variant="ghost"
size="sm"
onClick={() => navigate(`/manufacturers/${manufacturerSlug}/models/${model.slug}`)}
>
View Details
</Button>
<div className="text-sm text-muted-foreground">
{rideCount} {rideCount === 1 ? 'ride' : 'rides'}
</div>
</CardContent>
</Card>