This repository has been archived on 2024-10-29. You can view files and clone it, but cannot push or open issues or pull requests.
FunctionProject/website/pages/_document.jsx

29 lines
609 B
React
Raw Permalink Normal View History

2020-08-03 12:04:07 +02:00
import Document, { Html, Head, Main, NextScript } from 'next/document'
import Loader from '../components/Loader'
2020-03-18 16:26:18 +01:00
class MyDocument extends Document {
2020-08-03 12:04:07 +02:00
static async getInitialProps (ctx) {
const initialProps = await Document.getInitialProps(ctx)
return { ...initialProps }
}
2020-03-18 16:26:18 +01:00
2020-08-03 12:04:07 +02:00
render () {
return (
<Html lang='fr'>
<Head />
<body>
<div id='preloader'>
<Loader />
</div>
<div className='isLoading'>
<Main />
</div>
<NextScript />
</body>
</Html>
)
}
2020-03-18 16:26:18 +01:00
}
2020-08-03 12:04:07 +02:00
export default MyDocument