Skip to content

Instantly share code, notes, and snippets.

@elzup elzup/_app.tsx
Created Feb 11, 2020

Embed
What would you like to do?
Next.js with typescript minimum pages/_document.tsx, pages/_app.tsx
import { AppProps } from 'next/app'
const App = ({ Component, pageProps }: AppProps) => <Component {...pageProps} />
export default App
import NextDocument, { Html, Head, Main, NextScript } from 'next/document'
import React from 'react'
type Props = {}
class Document extends NextDocument<Props> {
render() {
return (
<Html>
<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>
<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
You can’t perform that action at this time.