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

30 lines
1.0 KiB
TypeScript
Raw Normal View History

2022-12-06 13:45:23 +01:00
import { ReactElement, ReactNode } from "react";
import { NextPage } from "next";
2023-04-04 22:02:32 +00:00
import type { AppProps } from "next/app";
import "../../../node_modules/placeholder-loading/src/scss/placeholder-loading.scss";
import "../../../node_modules/react-resizable/css/styles.css";
import "../styles/tailwind.css";
import { SessionProvider } from "next-auth/react";
2023-01-13 19:01:58 +01:00
import { Toaster } from "react-hot-toast";
2023-04-04 22:02:32 +00:00
import "react-tooltip/dist/react-tooltip.css";
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;
};
2023-04-04 22:02:32 +00:00
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
}