2020-12-04 20:16:24 +01:00
|
|
|
import React from 'react'
|
|
|
|
|
import Document, {
|
|
|
|
|
Html, Head, Main, NextScript
|
|
|
|
|
} from 'next/document'
|
|
|
|
|
import {ServerStyleSheets} from '@material-ui/core/styles'
|
|
|
|
|
|
|
|
|
|
export default class MyDocument extends Document {
|
|
|
|
|
render() {
|
|
|
|
|
return (
|
|
|
|
|
<Html lang='fr' prefix='website: https://ogp.me/ns/website#'>
|
2022-01-09 21:47:11 +04:00
|
|
|
<Head>
|
|
|
|
|
<link rel='manifest' href='/manifest.json' />
|
|
|
|
|
<link rel='icon' type='image/x-icon' sizes='128x128' href='/favicon.ico' />
|
|
|
|
|
<link rel='apple-touch-icon' href='/favicon.ico' />
|
|
|
|
|
<meta name='application-name' content='#OKi | Organisation KA Internationale' />
|
|
|
|
|
<meta name='theme-color' content='#303030' />
|
|
|
|
|
<meta name='apple-mobile-web-app-status-bar' content='#303030' />
|
|
|
|
|
<meta charSet='utf-8' />
|
|
|
|
|
<meta name='viewport' content='minimum-scale=1, initial-scale=1, width=device-width' />
|
|
|
|
|
</Head>
|
2020-12-04 20:16:24 +01:00
|
|
|
<body>
|
|
|
|
|
<Main />
|
|
|
|
|
<NextScript />
|
|
|
|
|
</body>
|
|
|
|
|
</Html>
|
|
|
|
|
)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
MyDocument.getInitialProps = async ctx => {
|
|
|
|
|
const sheets = new ServerStyleSheets()
|
|
|
|
|
const originalRenderPage = ctx.renderPage
|
|
|
|
|
|
|
|
|
|
ctx.renderPage = () => originalRenderPage({
|
|
|
|
|
enhanceApp: App => props => sheets.collect(<App {...props} />)
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
const initialProps = await Document.getInitialProps(ctx)
|
|
|
|
|
|
|
|
|
|
return {
|
|
|
|
|
...initialProps,
|
|
|
|
|
styles: [...React.Children.toArray(initialProps.styles), sheets.getStyleElement()]
|
|
|
|
|
}
|
|
|
|
|
}
|