Files
sign/apps/web/pages/_app.tsx

27 lines
760 B
TypeScript
Raw Normal View History

2022-12-06 14:51:03 +01:00
import "../styles/tailwind.css";
2022-12-06 13:45:23 +01:00
import { ReactElement, ReactNode } from "react";
import type { AppProps } from "next/app";
import { NextPage } from "next";
import { SessionProvider } from "next-auth/react";
2023-01-11 11:44:35 +01:00
export { coloredConsole } from "@documenso/lib";
2022-11-14 23:12:51 +01:00
2022-12-06 13:45:23 +01:00
export type NextPageWithLayout<P = {}, IP = P> = NextPage<P, IP> & {
getLayout?: (page: ReactElement) => ReactNode;
};
type AppPropsWithLayout = AppProps & {
Component: NextPageWithLayout;
};
export default function App({
Component,
pageProps: { session, ...pageProps },
}: AppPropsWithLayout) {
2022-12-06 13:45:23 +01:00
const getLayout = Component.getLayout || ((page: any) => page);
return getLayout(
<SessionProvider session={session}>
<Component {...pageProps} />{" "}
</SessionProvider>
);
2022-11-14 23:12:51 +01:00
}