mirror of
https://github.com/theoludwig/theoludwig.git
synced 2024-12-08 00:44:30 +01:00
32 lines
616 B
TypeScript
32 lines
616 B
TypeScript
|
import Document, {
|
||
|
Html,
|
||
|
Head,
|
||
|
Main,
|
||
|
NextScript,
|
||
|
DocumentContext,
|
||
|
DocumentInitialProps
|
||
|
} from 'next/document'
|
||
|
|
||
|
class MyDocument extends Document {
|
||
|
static async getInitialProps(
|
||
|
ctx: DocumentContext
|
||
|
): Promise<DocumentInitialProps> {
|
||
|
const initialProps = await Document.getInitialProps(ctx)
|
||
|
return initialProps
|
||
|
}
|
||
|
|
||
|
render(): JSX.Element {
|
||
|
return (
|
||
|
<Html>
|
||
|
<Head />
|
||
|
<body className='bg-white dark:bg-black text-black dark:text-white font-headline'>
|
||
|
<Main />
|
||
|
<NextScript />
|
||
|
</body>
|
||
|
</Html>
|
||
|
)
|
||
|
}
|
||
|
}
|
||
|
|
||
|
export default MyDocument
|