import type { ReactNode } from "react";
import prisma from "@/server/db/prisma";

export const dynamic = "force-dynamic";

export async function generateMetadata() {
  // Fetch the SEO entry for the projects page
  const seo = await prisma.seometadata.findFirst({
    where: { pageType: "PROJECT" },
  });
  return {
    title: seo?.title || "Projects - Nitescape",
    description: seo?.metaDescription || "Explore our projects at Nitescape.",
  };
}

export default function ProjectsLayout({ children }: { children: ReactNode }) {
  return <>{children}</>;
}
