fix: serialize prisma decimal to string for client component & add VPS analytics

This commit is contained in:
Mustafa Yildiz
2026-07-12 15:15:06 +03:00
parent cd777b7af2
commit e4de0eb321
2 changed files with 20 additions and 3 deletions
+16 -3
View File
@@ -30,9 +30,22 @@ export default async function ProductsPage() {
</div>
<div className="space-y-4">
{categories.map((category) => (
<CategoryAccordion key={category.id} category={category} defaultOpen={false} />
))}
{categories.map((category) => {
const serializedCategory = {
...category,
products: category.products.map(p => ({
...p,
price: p.price ? p.price.toString() : '0'
}))
}
return (
<CategoryAccordion
key={category.id}
category={serializedCategory as any}
defaultOpen={false}
/>
)
})}
</div>
</div>
)