Skip to content

Instantly share code, notes, and snippets.

@zsherman

zsherman/Main.js Secret

Created August 16, 2017 15:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zsherman/dbca653f21ec41b05c37c1a892d9b9a9 to your computer and use it in GitHub Desktop.
Save zsherman/dbca653f21ec41b05c37c1a892d9b9a9 to your computer and use it in GitHub Desktop.
/* layouts/Main.js */
import Head from 'next/head'
import Wrapper from './Wrapper'
import Nav from 'components/Nav'
import Footer from 'components/Footer'
export default ({ children, title = 'This is the default title' }) => (
<Wrapper>
<Head>
<title>{ title }</title>
</Head>
<header>
<Nav />
</header>
<main>
{ children }
</main>
<Footer>
Footer
</Footer>
</Wrapper>
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment