-
Notifications
You must be signed in to change notification settings - Fork 14
Expand file tree
/
Copy path_app.tsx
More file actions
40 lines (33 loc) · 1.17 KB
/
_app.tsx
File metadata and controls
40 lines (33 loc) · 1.17 KB
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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
// node modules
import React from 'react';
import type { AppProps } from 'next/app';
// packages
import WithReactQuery from 'services';
import { theme } from 'themes';
import GlobalContextProvider from '../stores/globalContext';
import globalStyle from '../styles/cssIncludes';
// Will be called once for every metric that has to be reported.
// export function reportWebVitals(metric: any) {
// These metrics can be sent to any analytics service
// console.log(metric);
// }
function MyApp({ Component, pageProps }: AppProps) {
return (
<GlobalContextProvider>
{/*@ts-ignore*/}
<Component {...pageProps} />
</GlobalContextProvider>
);
}
// Only uncomment this method if you have blocking data requirements for
// every single page in your application. This disables the ability to
// perform automatic static optimization, causing every page in your app to
// be server-side rendered.
//
// MyApp.getInitialProps = async (appContext) => {
// // calls page's `getInitialProps` and fills `appProps.pageProps`
// const appProps = await App.getInitialProps(appContext);
//
// return { ...appProps }
// }
export default WithReactQuery(MyApp, { devTools: true });