From e4de0eb321fd36cac820958b0b99b8eea4557369 Mon Sep 17 00:00:00 2001 From: Mustafa Yildiz Date: Sun, 12 Jul 2026 15:15:06 +0300 Subject: [PATCH] fix: serialize prisma decimal to string for client component & add VPS analytics --- app/[locale]/layout.tsx | 4 ++++ app/admin/(dashboard)/products/page.tsx | 19 ++++++++++++++++--- 2 files changed, 20 insertions(+), 3 deletions(-) diff --git a/app/[locale]/layout.tsx b/app/[locale]/layout.tsx index ed5c4f5..734fe88 100644 --- a/app/[locale]/layout.tsx +++ b/app/[locale]/layout.tsx @@ -48,6 +48,10 @@ export default async function LocaleLayout({ return ( + + {/* VPS Panel Analytics */} + + {children} diff --git a/app/admin/(dashboard)/products/page.tsx b/app/admin/(dashboard)/products/page.tsx index 1271718..30290f4 100644 --- a/app/admin/(dashboard)/products/page.tsx +++ b/app/admin/(dashboard)/products/page.tsx @@ -30,9 +30,22 @@ export default async function ProductsPage() {
- {categories.map((category) => ( - - ))} + {categories.map((category) => { + const serializedCategory = { + ...category, + products: category.products.map(p => ({ + ...p, + price: p.price ? p.price.toString() : '0' + })) + } + return ( + + ) + })}
)