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";
|
2023-01-04 14:37:33 +01:00
|
|
|
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;
|
|
|
|
|
};
|
|
|
|
|
|
2023-01-04 14:37:33 +01: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 (
|
2023-01-04 14:37:33 +01:00
|
|
|
<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} />)}
|
2023-01-04 14:37:33 +01:00
|
|
|
</SessionProvider>
|
|
|
|
|
);
|
2022-11-14 23:12:51 +01:00
|
|
|
}
|