import { ProjectProvider } from "../../context/ProjectContext";
import { getProjectDetails } from "@/data/content";

export default async function SlugLayout({children, params}: {
  children: React.ReactNode;
  params: Promise<{ slug: string }>;
}) {

    const {slug} = await params;
    const projectData = await getProjectDetails(slug)
  return (
    <ProjectProvider value={projectData}>
        <main>
          {children}
        </main>     
      </ProjectProvider>
  );
}
