import { prisma } from "@/lib/prisma"; import { getYouTubeId } from "@/lib/utils"; import { getLocale } from "next-intl/server"; import { notFound } from "next/navigation"; import { use } from "react"; export default async function Page({ params }: { params: Promise<{ slug: string }> }) { const { slug } = await params; const locale = await getLocale(); const menu = await prisma.menu.findUnique({ where: { slug: slug, }, include: { videos: { where: { isPublic: true, }, orderBy: { createdAt: 'desc', }, }, }, }); if (!menu) { notFound(); } const getLocalizedText = (json: any) => { if (!json) return ''; return json[locale] || json['id'] || json['en'] || ''; }; return (
{video.description}
)}Belum ada video di menu ini.