import { prisma } from "@/app/lib/prisma"; import MenuView from "./components/MenuView"; export const dynamic = 'force-dynamic'; export default async function Page() { try { const restaurant = await prisma.restaurant.findFirst({ orderBy: { createdAt: 'desc' }, include: { categories: { include: { items: true, }, orderBy: { createdAt: 'asc', }, }, }, }); if (!restaurant) { return (
Henüz menü verisi bulunamadı veya veritabanı bağlantısı kurulamadı.
Lütfen admin panelinden bir restoran ve kategori oluşturulduğundan emin olun.
Restoran bulundu ancak henüz hiç kategori eklenmemiş.
Lütfen admin panelinden kategori ve ürün ekleyin.
Veritabanı bağlantısı sırasında bir hata oluştu.
{error.message || "Bilinmeyen hata"}