mirror of
https://github.com/Stone-Red-Code/website.git
synced 2026-09-06 07:56:11 +02:00
feat: persist layout state across pages
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
import React, { PropsWithChildren } from "react"
|
||||
import { Layout } from "../components/Layout"
|
||||
import { ResourcesLayout } from "../components/ResourcesLayout"
|
||||
|
||||
export default function BaseLayout({
|
||||
children,
|
||||
pageContext,
|
||||
}: PropsWithChildren<{
|
||||
pageContext: {
|
||||
layout?: string
|
||||
}
|
||||
}>) {
|
||||
if (pageContext.layout === "resources") {
|
||||
return <ResourcesLayout>{children}</ResourcesLayout>
|
||||
}
|
||||
|
||||
return <Layout>{children}</Layout>
|
||||
}
|
||||
Reference in New Issue
Block a user