This commit is contained in:
gpt-engineer-app[bot]
2025-12-19 15:17:47 +00:00
parent f57bba6f9c
commit 7fc10126df
11 changed files with 979 additions and 88 deletions

View File

@@ -86,6 +86,13 @@ export default function Products() {
}
};
// Strip HTML tags for preview, but keep first 100 chars
const stripHtml = (html: string) => {
const tmp = document.createElement('div');
tmp.innerHTML = html;
return tmp.textContent || tmp.innerText || '';
};
return (
<AppLayout>
<div className="container mx-auto px-4 py-8">
@@ -149,7 +156,10 @@ export default function Products() {
<CardTitle className="text-xl">{product.title}</CardTitle>
<Badge className="bg-secondary">{getTypeLabel(product.type)}</Badge>
</div>
<CardDescription className="line-clamp-2">{product.description}</CardDescription>
<CardDescription
className="line-clamp-2"
dangerouslySetInnerHTML={{ __html: product.description }}
/>
</CardHeader>
<CardContent>
<div className="flex items-center gap-2 mb-4">