fix: serialize prisma decimal to string for client component & add VPS analytics
This commit is contained in:
@@ -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}
|
||||||
|
|||||||
@@ -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>
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user