Last active
July 5, 2023 12:42
-
-
Save elzup/db2229b132ccda46d4ac3b25a52b60b7 to your computer and use it in GitHub Desktop.
Next.js with typescript minimum pages/_document.tsx, pages/_app.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { AppProps } from 'next/app' | |
import Head from 'next/head' | |
const App = ({ Component, pageProps }: AppProps) => ( | |
<> | |
<Head> | |
<meta | |
name="viewport" | |
content="width=device-width, initial-scale=1, shrink-to-fit=no" | |
/> | |
<link rel="shortcut icon" href="/favicon.png" key="shortcutIcon" /> | |
<link rel="manifest" href="/manifest.json" /> | |
</Head> | |
<Component {...pageProps} /> | |
</> | |
) | |
export default App |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import NextDocument, { Html, Head, Main, NextScript } from 'next/document' | |
import React from 'react' | |
type Props = {} | |
class Document extends NextDocument<Props> { | |
render() { | |
return ( | |
<Html> | |
<Head /> | |
<body> | |
<Main /> | |
<NextScript /> | |
</body> | |
</Html> | |
) | |
} | |
} | |
export default Document |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment