mirror of
https://github.com/documenso/documenso.git
synced 2025-11-14 08:42:12 +10:00
17 lines
517 B
TypeScript
17 lines
517 B
TypeScript
import { ReactElement, ReactNode } from "react";
|
|
import type { AppProps } from "next/app";
|
|
import { NextPage } from "next";
|
|
|
|
export type NextPageWithLayout<P = {}, IP = P> = NextPage<P, IP> & {
|
|
getLayout?: (page: ReactElement) => ReactNode;
|
|
};
|
|
|
|
type AppPropsWithLayout = AppProps & {
|
|
Component: NextPageWithLayout;
|
|
};
|
|
|
|
export default function App({ Component, pageProps }: AppPropsWithLayout) {
|
|
const getLayout = Component.getLayout || ((page: any) => page);
|
|
return getLayout(<Component {...pageProps} />);
|
|
}
|