forked from basir/next-amazona
-
Notifications
You must be signed in to change notification settings - Fork 0
/
_app.js
25 lines (23 loc) · 758 Bytes
/
_app.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
import { PayPalScriptProvider } from '@paypal/react-paypal-js';
import { SnackbarProvider } from 'notistack';
import { useEffect } from 'react';
import '../styles/globals.css';
import { StoreProvider } from '../utils/Store';
function MyApp({ Component, pageProps }) {
useEffect(() => {
const jssStyles = document.querySelector('#jss-server-side');
if (jssStyles) {
jssStyles.parentElement.removeChild(jssStyles);
}
}, []);
return (
<SnackbarProvider anchorOrigin={{ vertical: 'top', horizontal: 'center' }}>
<StoreProvider>
<PayPalScriptProvider deferLoading={true}>
<Component {...pageProps} />
</PayPalScriptProvider>
</StoreProvider>
</SnackbarProvider>
);
}
export default MyApp;