@@ -6,6 +6,7 @@ import { Analytics } from '@vercel/analytics/react';
66import { NextComponentType } from 'next' ;
77import { IntlError , NextIntlClientProvider } from 'next-intl' ;
88import type { AppProps } from 'next/app' ;
9+ import { Montserrat , Open_Sans } from 'next/font/google' ;
910import { useRouter } from 'next/router' ;
1011import { NextPageContext } from 'next/types' ;
1112import { Hotjar } from 'nextjs-hotjar' ;
@@ -27,6 +28,25 @@ import { wrapper } from '../store/store';
2728import '../styles/globals.css' ;
2829import theme from '../styles/theme' ;
2930
31+ // <link
32+ // href="https://fonts.googleapis.com/css2?family=Montserrat:ital,wght@0,300;0,400;0,500;1,300;1,400;1,500&family=Open+Sans:ital,wght@0,300;0,400;0,600;1,300;1,400;1,600&display=swap"
33+ // rel="stylesheet"
34+ // />;
35+
36+ export const openSans = Open_Sans ( {
37+ subsets : [ 'latin' ] ,
38+ weight : [ '300' , '400' , '600' ] ,
39+ variable : '--font-open-sans' ,
40+ display : 'swap' ,
41+ } ) ;
42+
43+ export const montserrat = Montserrat ( {
44+ subsets : [ 'latin' ] ,
45+ weight : [ '300' , '400' , '500' ] ,
46+ variable : '--font-montserrat' ,
47+ display : 'swap' ,
48+ } ) ;
49+
3050// For SSG compatibility with MUI
3151// Client-side emotion cache, shared for the whole session of the user in the browser.
3252const clientSideEmotionCache = createEmotionCache ( ) ;
@@ -65,31 +85,33 @@ function MyApp(props: MyAppProps) {
6585 }
6686
6787 return (
68- < ErrorBoundary >
69- < NextIntlClientProvider
70- messages = { pageProps . messages }
71- locale = { router . locale }
72- timeZone = "Europe/London"
73- onError = { onIntlError }
74- >
75- < DefaultHeadMetadata />
76- < ThemeProvider theme = { theme } >
77- < CssBaseline />
78- < TopBar />
79- { pathHead !== 'partner-admin' && < LeaveSiteButton /> }
80- < AuthGuard >
81- < Component { ...pageProps } />
82- </ AuthGuard >
83- < Footer />
84- < Consent />
85- { ! ! process . env . NEXT_PUBLIC_HOTJAR_ID && process . env . NEXT_PUBLIC_ENV !== 'local' && (
86- < Hotjar id = { process . env . NEXT_PUBLIC_HOTJAR_ID } sv = { 6 } strategy = "lazyOnload" />
87- ) }
88- { /* Vercel analytics */ }
89- < Analytics />
90- </ ThemeProvider >
91- </ NextIntlClientProvider >
92- </ ErrorBoundary >
88+ < div className = { `${ openSans . variable } ${ montserrat . variable } ` } >
89+ < ErrorBoundary >
90+ < NextIntlClientProvider
91+ messages = { pageProps . messages }
92+ locale = { router . locale }
93+ timeZone = "Europe/London"
94+ onError = { onIntlError }
95+ >
96+ < DefaultHeadMetadata />
97+ < ThemeProvider theme = { theme } >
98+ < CssBaseline />
99+ < TopBar />
100+ { pathHead !== 'partner-admin' && < LeaveSiteButton /> }
101+ < AuthGuard >
102+ < Component { ...pageProps } />
103+ </ AuthGuard >
104+ < Footer />
105+ < Consent />
106+ { ! ! process . env . NEXT_PUBLIC_HOTJAR_ID && process . env . NEXT_PUBLIC_ENV !== 'local' && (
107+ < Hotjar id = { process . env . NEXT_PUBLIC_HOTJAR_ID } sv = { 6 } strategy = "lazyOnload" />
108+ ) }
109+ { /* Vercel analytics */ }
110+ < Analytics />
111+ </ ThemeProvider >
112+ </ NextIntlClientProvider >
113+ </ ErrorBoundary >
114+ </ div >
93115 ) ;
94116}
95117
0 commit comments