import { Link } from "wouter"; import type { ToolWithStats } from "@workspace/api-client-react"; import { Badge } from "@/components/ui/badge"; import { RatingStars } from "@/components/rating-stars"; import { MiniBars } from "@/components/mini-bars"; export function ToolPreviewCard({ tool }: { tool: ToolWithStats }) { return (
{tool.name}
{tool.category}

{tool.description}

{tool.ratingCount} review{tool.ratingCount === 1 ? "" : "s"} {tool.avgCombined != null ? tool.avgCombined.toFixed(1) : "–"}/5
{tool.tags && tool.tags.length > 0 && (
{tool.tags.slice(0, 4).map((tag) => ( {tag} ))} {tool.tags.length > 4 && ( +{tool.tags.length - 4} )}
)} View details
); }