-
Notifications
You must be signed in to change notification settings - Fork 0
/
_app.tsx
36 lines (32 loc) · 1.1 KB
/
_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
24
25
26
27
28
29
30
31
32
33
34
35
36
import type {AppProps} from 'next/app'
import {theme} from "themes";
import {ThemeProvider} from "styled-components";
import {appWithTranslation} from "next-i18next";
import {ApolloProvider} from "@apollo/client";
import {Cardo} from '@next/font/google'
import './styles.scss'
import {MainLayout} from "@layout";
import client, {createFetcher} from "@helpers";
import {SWRConfig} from 'swr';
const cardo = Cardo({weight: "400", subsets: ["latin"]})
function MyApp({Component, pageProps}: AppProps) {
return (
<>
<style jsx global>{`
html {
font-family: ${cardo.style.fontFamily};
}
`}</style>
<ThemeProvider theme={theme}>
<SWRConfig value={{fetcher: createFetcher()}}>
<ApolloProvider client={client}>
<MainLayout>
<Component {...pageProps} />
</MainLayout>
</ApolloProvider>
</SWRConfig>
</ThemeProvider>
</>
)
}
export default appWithTranslation(MyApp)