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

@@ -58,7 +58,7 @@ export function ManufacturerCard({ company }: ManufacturerCardProps) {
<div className="absolute inset-0 bg-gradient-to-t from-background/80 via-transparent to-transparent" />
{/* Company Type Badge */}
<div className="absolute top-2 right-2 md:top-3 md:right-3 z-10">
<div className="absolute top-3 right-3 z-10">
<Badge variant="outline" className="bg-background/80 backdrop-blur-sm text-xs">
{formatCompanyType(company.company_type)}
</Badge>
@@ -102,7 +102,7 @@ export function ManufacturerCard({ company }: ManufacturerCardProps) {
{company.headquarters_location && (
<div className="flex items-center gap-1 min-w-0">
<MapPin className="w-3 h-3 text-muted-foreground shrink-0" />
<MapPin className="w-3 h-3 shrink-0" />
<span className="text-muted-foreground truncate">
{company.headquarters_location}
</span>
@@ -110,19 +110,9 @@ export function ManufacturerCard({ company }: ManufacturerCardProps) {
)}
</div>
{/* Rating */}
{company.average_rating > 0 && (
<div className="flex items-center gap-1">
<Star className="w-3.5 h-3.5 md:w-4 md:h-4 fill-yellow-400 text-yellow-400" />
<span className="text-xs md:text-sm font-medium">{company.average_rating.toFixed(1)}</span>
{company.review_count > 0 && (
<span className="text-xs text-muted-foreground">({company.review_count})</span>
)}
</div>
)}
{/* Stats Display */}
<div className="flex flex-wrap gap-x-3 md:gap-x-4 gap-y-1 text-xs md:text-sm">
<div className="flex items-center justify-between text-xs md:text-sm">
<div className="flex flex-wrap gap-x-3 md:gap-x-4 gap-y-1">
{company.ride_count && company.ride_count > 0 && (
<div className="flex items-center gap-1">
<FerrisWheel className="w-3 h-3 text-muted-foreground" />
@@ -146,6 +136,17 @@ export function ManufacturerCard({ company }: ManufacturerCardProps) {
<span className="text-muted-foreground">models</span>
</div>
)}
</div>
{company.average_rating > 0 && (
<div className="flex items-center gap-1">
<Star className="w-3 h-3 fill-yellow-400 text-yellow-400" />
<span className="text-sm font-medium">{company.average_rating.toFixed(1)}</span>
{company.review_count > 0 && (
<span className="text-xs text-muted-foreground">({company.review_count})</span>
)}
</div>
)}
</div>
</CardContent>
</Card>