From 3f271d6922fca43da2cb5a918041cb7aeaf6e3bc Mon Sep 17 00:00:00 2001 From: Vula Builder Date: Sun, 11 Oct 2026 14:20:31 +0000 Subject: [PATCH] Deploy --- src/app/menu/[dishId]/page.tsx | 55 ++++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 src/app/menu/[dishId]/page.tsx diff --git a/src/app/menu/[dishId]/page.tsx b/src/app/menu/[dishId]/page.tsx new file mode 100644 index 0000000..52d52c1 --- /dev/null +++ b/src/app/menu/[dishId]/page.tsx @@ -0,0 +1,55 @@ +import { Suspense } from 'react' +import Link from 'next/link' +import { ArrowLeft } from 'lucide-react' +import DishDetailClient from '@/components/shop/DishDetailClient' + +export const dynamic = 'force-dynamic' +export const revalidate = 0 + +const VULA_CMS_URL = process.env.VULA_CMS_URL || 'https://ide.vulai.co.za' +const VULA_PROJECT_ID = process.env.VULA_CMS_PROJECT_ID || '' + +async function getDish(dishId: string) { + try { + const res = await fetch( + `${VULA_CMS_URL}/api/store/${VULA_PROJECT_ID}/products/${dishId}`, + { cache: 'no-store', signal: AbortSignal.timeout(8000) } + ) + if (!res.ok) return null + const data = await res.json() + return data.product ?? data ?? null + } catch { + return null + } +} + +interface PageProps { params: { dishId: string } } + +export default async function DishDetailPage({ params }: PageProps) { + const dish = await getDish(params.dishId) + return ( +
+
+ + +
+
+ }> + +
+
+
+ ) +}