import { ToolWithStats } from "@workspace/api-client-react"; import { Card, CardHeader, CardTitle, CardDescription, CardContent, CardFooter } from "@/components/ui/card"; import { Badge } from "@/components/ui/badge"; import { Star, MessageSquare, Wrench } from "lucide-react"; import { Link } from "wouter"; export function ToolCard({ tool }: { tool: ToolWithStats }) { return (
{tool.iconUrl ? ( {tool.name} { (e.target as HTMLImageElement).style.display = "none"; }} /> ) : ( )}
{tool.name} {tool.category}
{tool.description}
{tool.tags?.slice(0, 3).map((tag) => ( {tag} ))} {(tool.tags?.length || 0) > 3 && ( +{(tool.tags?.length || 0) - 3} )}
{tool.avgCombined ? tool.avgCombined.toFixed(1) : "N/A"}
{tool.ratingCount}
); }