refactor(pages): improve _document.tsx types with default locale

This commit is contained in:
Walid 2022-03-24 11:38:07 +01:00
parent cbb8ab9fd5
commit a3efc793c0
No known key found for this signature in database
GPG Key ID: 4BDA1ABD227F9279

View File

@ -1,8 +1,9 @@
import { Html, Main, Head, NextScript } from 'next/document'
import Document, { Html, Main, Head, NextScript } from 'next/document'
const NextDocument: React.FC = (): JSX.Element => {
class MyDocument extends Document {
render(): JSX.Element {
return (
<Html>
<Html lang='en'>
<Head />
<body>
<Main />
@ -10,6 +11,7 @@ const NextDocument: React.FC = (): JSX.Element => {
</body>
</Html>
)
}
}
export default NextDocument
export default MyDocument