|
|
@@ -3,6 +3,7 @@ import React, { ReactElement, ReactNode, useEffect } from 'react';
|
|
|
import { NextPage } from 'next';
|
|
|
import { appWithTranslation } from 'next-i18next';
|
|
|
import { AppProps } from 'next/app';
|
|
|
+import { Lato } from 'next/font/google';
|
|
|
import { SWRConfig } from 'swr';
|
|
|
|
|
|
import * as nextI18nConfig from '^/config/next-i18next.config';
|
|
|
@@ -24,6 +25,13 @@ import '~/styles/prebuilt/apply-colors.css';
|
|
|
|
|
|
const isDev = process.env.NODE_ENV === 'development';
|
|
|
|
|
|
+// define fonts
|
|
|
+const lato = Lato({
|
|
|
+ weight: ['400', '700'],
|
|
|
+ style: ['normal', 'italic'],
|
|
|
+ subsets: ['latin'],
|
|
|
+ display: 'swap',
|
|
|
+});
|
|
|
|
|
|
// eslint-disable-next-line @typescript-eslint/ban-types
|
|
|
export type NextPageWithLayout<P = {}, IP = P> = NextPage<P, IP> & {
|
|
|
@@ -57,9 +65,16 @@ function GrowiApp({ Component, pageProps }: GrowiAppProps): JSX.Element {
|
|
|
const getLayout = Component.getLayout ?? (page => page);
|
|
|
|
|
|
return (
|
|
|
- <SWRConfig value={swrGlobalConfiguration}>
|
|
|
- {getLayout(<Component {...pageProps} />)}
|
|
|
- </SWRConfig>
|
|
|
+ <>
|
|
|
+ <style jsx global>{`
|
|
|
+ :root {
|
|
|
+ --font-family-sans-serif: ${lato.style.fontFamily};
|
|
|
+ }
|
|
|
+ `}</style>
|
|
|
+ <SWRConfig value={swrGlobalConfiguration}>
|
|
|
+ {getLayout(<Component {...pageProps} />)}
|
|
|
+ </SWRConfig>
|
|
|
+ </>
|
|
|
);
|
|
|
}
|
|
|
|