Refactor: Apply consistent card styling

This commit is contained in:
gpt-engineer-app[bot]
2025-10-17 22:45:58 +00:00
parent cce478ae32
commit d195456a29
6 changed files with 118 additions and 114 deletions

View File

@@ -72,14 +72,16 @@ const ParkOwnerCard = ({ company }: ParkOwnerCardProps) => {
)}
</div>
<CardContent className="p-3 space-y-2">
<CardContent className="p-2.5 space-y-1.5 border-t border-border/30">
{/* Company Name */}
<h3 className="text-base font-semibold group-hover:text-primary transition-colors line-clamp-2">
{company.name}
</h3>
<div className="space-y-0.5 min-w-0">
<h3 className="text-base font-semibold group-hover:text-primary transition-colors line-clamp-2 break-words">
{company.name}
</h3>
</div>
{/* Company Info */}
<div className="flex flex-wrap gap-x-4 gap-y-1 text-sm">
<div className="flex flex-wrap gap-3 gap-y-1 text-sm">
{company.founded_year && (
<div className="flex items-center gap-1">
<span className="text-muted-foreground">Founded:</span>
@@ -88,8 +90,8 @@ const ParkOwnerCard = ({ company }: ParkOwnerCardProps) => {
)}
{company.headquarters_location && (
<div className="flex items-center gap-1">
<MapPin className="w-3 h-3" />
<div className="flex items-center gap-1 min-w-0">
<MapPin className="w-3 h-3 flex-shrink-0" />
<span className="text-muted-foreground truncate">
{company.headquarters_location}
</span>
@@ -99,22 +101,22 @@ const ParkOwnerCard = ({ company }: ParkOwnerCardProps) => {
{/* Park Count Stats */}
<div className="flex items-center justify-between text-sm">
<div className="flex flex-wrap gap-x-4 gap-y-1">
<div className="flex flex-wrap gap-3 gap-y-1">
{company.park_count && company.park_count > 0 && (
<div className="flex items-center gap-1">
<Building2 className="w-3 h-3 text-muted-foreground" />
<Building2 className="w-4 h-4 text-primary/70 flex-shrink-0" />
<span className="font-medium">{company.park_count}</span>
<span className="text-muted-foreground">parks owned</span>
<span className="text-muted-foreground">parks</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>
<div className="inline-flex items-center gap-1">
<Star className="w-4 h-4 fill-yellow-500 text-yellow-500" />
<span className="font-semibold">{company.average_rating.toFixed(1)}</span>
{company.review_count > 0 && (
<span className="text-xs text-muted-foreground">({company.review_count})</span>
<span className="text-muted-foreground">({company.review_count})</span>
)}
</div>
)}