import { Link } from "wouter"; import { useTranslation } from "react-i18next"; 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 }) { const { t } = useTranslation(); return (
{tool.name}
{tool.category}

{tool.description}

{t("browse.reviewCount", { count: tool.ratingCount })} {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} )}
)} {t("common.viewDetails")}
); }