mirror of
https://github.com/terribleplan/next.js.git
synced 2024-01-19 02:48:18 +00:00
c090a57e77
Changes: * updated packages * moved the content of `layout` to `_app.js` and created simple `Page` component * replaced `import * as React` because it is not necessary to import everything * moved `next.js.flow` to `flow-typed` as it is default directory for library definitions * updated the gif
18 lines
306 B
JavaScript
18 lines
306 B
JavaScript
// @flow
|
|
import React, { type Node } from 'react'
|
|
import Head from 'next/head'
|
|
|
|
type Props = {
|
|
children: Node,
|
|
title?: string
|
|
}
|
|
|
|
export default ({ children, title = 'This is the default title' }: Props) => (
|
|
<section>
|
|
<Head>
|
|
<title>{title}</title>
|
|
</Head>
|
|
{children}
|
|
</section>
|
|
)
|