added project pages, updated page for FAM.
This commit is contained in:
18
app/project/[slug]/layout.tsx
Normal file
18
app/project/[slug]/layout.tsx
Normal file
@@ -0,0 +1,18 @@
|
||||
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>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user