Skip to content

Commit

Permalink
Add custom _document to override default structure/tags styles
Browse files Browse the repository at this point in the history
  • Loading branch information
Al-Ghoul committed Mar 4, 2023
1 parent 8a9e7b0 commit 7dc1c73
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions src/pages/_document.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
import { Html, Head, Main, NextScript } from 'next/document'
import Document, { 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() {
return (
<Html className="bg-gradient-to-tr from-[#591a5a] to-[#2c8b8b]">
<Head />
<body>
<Main />
<NextScript />
</body>
</Html>
)
}
}


export default MyDocument

0 comments on commit 7dc1c73

Please sign in to comment.