Refactor ManufacturerCard button

This commit is contained in:
gpt-engineer-app[bot]
2025-09-29 13:57:51 +00:00
parent 34ed211fa3
commit 760047bf7a

View File

@@ -108,21 +108,32 @@ export function ManufacturerCard({ company }: ManufacturerCardProps) {
</div>
)}
{/* Action Button */}
{company.website_url && (
<Button
variant="outline"
size="sm"
className="w-full bg-gradient-to-r from-primary/5 to-primary/10 hover:from-primary/10 hover:to-primary/20 transition-all duration-200"
onClick={(e) => {
e.stopPropagation();
window.open(company.website_url, '_blank');
}}
>
<Globe className="w-4 h-4 mr-2" />
Visit Website
</Button>
)}
{/* Stats Display */}
<div className="flex flex-wrap gap-x-4 gap-y-1 text-sm">
{(company as any).ride_count > 0 && (
<div className="flex items-center gap-1">
<FerrisWheel className="w-3 h-3 text-muted-foreground" />
<span className="font-medium">{(company as any).ride_count}</span>
<span className="text-muted-foreground">rides</span>
</div>
)}
{(company as any).coaster_count > 0 && (
<div className="flex items-center gap-1">
<span className="text-muted-foreground"></span>
<span className="font-medium">{(company as any).coaster_count}</span>
<span className="text-muted-foreground">coasters</span>
</div>
)}
{(company as any).model_count > 0 && (
<div className="flex items-center gap-1">
<span className="text-muted-foreground"></span>
<span className="font-medium">{(company as any).model_count}</span>
<span className="text-muted-foreground">models</span>
</div>
)}
</div>
</CardContent>
</Card>
);