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
+4
View File
@@ -48,6 +48,10 @@ export default async function LocaleLayout({
return ( return (
<html lang={locale} className={`${cormorant.variable} ${jakarta.variable} h-full`}> <html lang={locale} className={`${cormorant.variable} ${jakarta.variable} h-full`}>
<head>
{/* VPS Panel Analytics */}
<script defer src="https://panel.ayris.tech/api/analytics/script" data-domain="http://menu.moybeachakyaka.com"></script>
</head>
<body className="min-h-full flex flex-col antialiased" suppressHydrationWarning> <body className="min-h-full flex flex-col antialiased" suppressHydrationWarning>
<NextIntlClientProvider messages={messages}> <NextIntlClientProvider messages={messages}>
{children} {children}
+16 -3
View File
@@ -30,9 +30,22 @@ export default async function ProductsPage() {
</div> </div>
<div className="space-y-4"> <div className="space-y-4">
{categories.map((category) => ( {categories.map((category) => {
<CategoryAccordion key={category.id} category={category} defaultOpen={false} /> 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>
</div> </div>
) )