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

32 lines
1.0 KiB
TypeScript
Raw Normal View History

2022-12-06 14:51:03 +01:00
import "../styles/tailwind.css";
2023-01-16 10:31:53 +01:00
import "../../../node_modules/placeholder-loading/src/scss/placeholder-loading.scss";
2023-02-08 15:43:14 +01:00
import "../../../node_modules/react-resizable/css/styles.css";
2023-01-31 15:42:04 +01:00
import "react-tooltip/dist/react-tooltip.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";
2023-01-13 19:01:58 +01:00
import { Toaster } from "react-hot-toast";
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);
2023-01-11 18:31:30 +01:00
return (
<SessionProvider session={session}>
2023-01-13 19:01:58 +01:00
<Toaster position="top-center"></Toaster>
2023-01-11 18:31:30 +01:00
{getLayout(<Component {...pageProps} />)}
</SessionProvider>
);
2022-11-14 23:12:51 +01:00
}