-
-
Save anonymous/7250e04c4e46cfcfa32d336cd389f8e9 to your computer and use it in GitHub Desktop.
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 Document, { Head, Main, NextScript } from 'next/document'; | |
import flush from 'styled-jsx/server' | |
export default class MyDocument extends Document { | |
static getInitialProps ({ renderPage }) { | |
const {html, head} = renderPage(); | |
const styles = flush(); | |
return { html, head, styles }; | |
} | |
render () { | |
return ( | |
<html> | |
<Head> | |
<style>{`body { margin: 0 } /* custom! */`}</style> | |
<title>Next.js 연습</title> | |
</Head> | |
<body> | |
<Main /> | |
<NextScript /> | |
</body> | |
</html> | |
); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment