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({ 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.
Veritabanı bağlantısı sırasında bir hata oluştu.
{error.message || "Bilinmeyen hata"}