Changes
This commit is contained in:
@@ -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">
|
||||
|
||||
Reference in New Issue
Block a user