From a3efc793c0d61e6f1b9c8a89562cce95d3c07548 Mon Sep 17 00:00:00 2001 From: Walidoux Date: Thu, 24 Mar 2022 11:38:07 +0100 Subject: [PATCH] refactor(pages): improve _document.tsx types with default locale --- pages/_document.tsx | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/pages/_document.tsx b/pages/_document.tsx index a7a85d5..7ead867 100644 --- a/pages/_document.tsx +++ b/pages/_document.tsx @@ -1,15 +1,17 @@ -import { Html, Main, Head, NextScript } from 'next/document' +import Document, { Html, Main, Head, NextScript } from 'next/document' -const NextDocument: React.FC = (): JSX.Element => { - return ( - - - -
- - - - ) +class MyDocument extends Document { + render(): JSX.Element { + return ( + + + +
+ + + + ) + } } -export default NextDocument +export default MyDocument