Files
documenso/apps/web/pages/_app.tsx
Timur Ercan 2c400576b4 app shell
2022-12-06 14:51:03 +01:00

18 lines
550 B
TypeScript

import "../styles/tailwind.css";
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} />);
}