mirror of
https://github.com/wassname/Open-Assistant.git
synced 2026-06-29 16:30:24 +08:00
21 lines
585 B
TypeScript
21 lines
585 B
TypeScript
// https://nextjs.org/docs/basic-features/layouts
|
|
|
|
import type { NextPage } from "next";
|
|
import { Header } from "src/components/Header";
|
|
|
|
import { Footer } from "./Footer";
|
|
|
|
export type NextPageWithLayout<P = unknown, IP = P> = NextPage<P, IP> & {
|
|
getLayout?: (page: React.ReactElement) => React.ReactNode;
|
|
};
|
|
|
|
export const getDefaultLayout = (page: React.ReactElement) => (
|
|
<div className="grid grid-rows-[min-content_1fr_min-content] h-full justify-items-stretch">
|
|
<Header />
|
|
{page}
|
|
<Footer />
|
|
</div>
|
|
);
|
|
|
|
export const noLayout = (page: React.ReactElement) => page;
|