import { Suspense } from 'react' import Link from 'next/link' import { ArrowLeft } from 'lucide-react' import ProductDetailClient from '@/components/shop/ProductDetailClient' 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 getProduct(productId: string) { try { const res = await fetch( `${VULA_CMS_URL}/api/store/${VULA_PROJECT_ID}/products/${productId}`, { 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: { productId: string } } export default async function ProductDetailPage({ params }: PageProps) { const product = await getProduct(params.productId) return (
}>
) }