markblog/pages/_document.tsx
Florian Bouillon a0f1799114
updated
Signed-off-by: Avior <florian.bouillon@delta-wings.net>
2020-01-04 17:35:30 +01:00

29 lines
608 B
TypeScript

// _document is only rendered on the server side and not on the client side
// Event handlers like onClick can't be added to this file
// ./pages/_document.js
import Document, { Html, Head, Main, NextScript } from 'next/document'
class MyDocument extends Document {
static async getInitialProps(ctx) {
const initialProps = await Document.getInitialProps(ctx)
return { ...initialProps }
}
render() {
return (
<Html>
<Head>
<link rel="manifest" href="/manifest.json" />
</Head>
<body>
<Main />
<NextScript />
</body>
</Html>
)
}
}
export default MyDocument