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> </div>
)} )}
{/* Action Button */} {/* Stats Display */}
{company.website_url && ( <div className="flex flex-wrap gap-x-4 gap-y-1 text-sm">
<Button {(company as any).ride_count > 0 && (
variant="outline" <div className="flex items-center gap-1">
size="sm" <FerrisWheel className="w-3 h-3 text-muted-foreground" />
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" <span className="font-medium">{(company as any).ride_count}</span>
onClick={(e) => { <span className="text-muted-foreground">rides</span>
e.stopPropagation(); </div>
window.open(company.website_url, '_blank'); )}
}}
> {(company as any).coaster_count > 0 && (
<Globe className="w-4 h-4 mr-2" /> <div className="flex items-center gap-1">
Visit Website <span className="text-muted-foreground"></span>
</Button> <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> </CardContent>
</Card> </Card>
); );