forked from rohitdasu/projectmate
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path_app.tsx
23 lines (22 loc) · 796 Bytes
/
_app.tsx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
import { AppProps } from 'next/app';
import { ErrorFallback } from '@/components/ErrorFallback';
import { Toaster } from '@/components/Toaster';
import { SessionProvider } from 'next-auth/react';
import { ErrorBoundary } from 'react-error-boundary';
import '@/styles/globals.css';
import { AppContextProvider } from '@/context/AppContextProvider';
export default function MyApp({ Component, pageProps }: AppProps) {
return (
<ErrorBoundary
FallbackComponent={ErrorFallback}
onReset={() => typeof window !== undefined && window.location.reload()}
>
<SessionProvider session={pageProps.session}>
<AppContextProvider>
<Component {...pageProps} />
<Toaster />
</AppContextProvider>
</SessionProvider>
</ErrorBoundary>
);
}