mirror of
https://github.com/Stone-Red-Code/website.git
synced 2026-09-06 07:56:11 +02:00
21 lines
492 B
TypeScript
21 lines
492 B
TypeScript
import React, { PropsWithChildren } from "react"
|
|
import { Layout } from "../components/Layout"
|
|
import { ResourcesLayout } from "../components/ResourcesLayout"
|
|
|
|
export default function BaseLayout({
|
|
children,
|
|
location,
|
|
pageContext,
|
|
}: PropsWithChildren<{
|
|
pageContext: {
|
|
layout?: string
|
|
}
|
|
location: Location
|
|
}>) {
|
|
if (pageContext.layout === "resources") {
|
|
return <ResourcesLayout>{children}</ResourcesLayout>
|
|
}
|
|
|
|
return <Layout location={location}>{children}</Layout>
|
|
}
|