Added a page component.
This commit is contained in:
parent
6a163846f8
commit
449b64b17f
25
app/components/page.js
Normal file
25
app/components/page.js
Normal file
@ -0,0 +1,25 @@
|
||||
import Head from 'next/head'
|
||||
|
||||
const Page = ({ title, children }) =>
|
||||
<div>
|
||||
<Head>
|
||||
<title>
|
||||
{title}
|
||||
</title>
|
||||
<style>
|
||||
{`
|
||||
html {
|
||||
font-family: sans-serif;
|
||||
color: white;
|
||||
background-color: #22a699;
|
||||
}
|
||||
body {
|
||||
margin: 2em;
|
||||
}
|
||||
`}
|
||||
</style>
|
||||
</Head>
|
||||
{children}
|
||||
</div>
|
||||
|
||||
export default Page
|
||||
@ -1,29 +1,14 @@
|
||||
import Head from 'next/head'
|
||||
import withData from '../helpers/with-data'
|
||||
import Page from '../components/page'
|
||||
import SingleUploader from '../components/single-uploader'
|
||||
import MultipleUploader from '../components/multiple-uploader'
|
||||
import UploadList from '../components/upload-list'
|
||||
import withData from '../helpers/with-data'
|
||||
|
||||
const HomePage = () =>
|
||||
<div>
|
||||
<Head>
|
||||
<title>Apollo upload examples</title>
|
||||
<style>
|
||||
{`
|
||||
html {
|
||||
font-family: sans-serif;
|
||||
color: white;
|
||||
background-color: #22a699;
|
||||
}
|
||||
body {
|
||||
margin: 2em;
|
||||
}
|
||||
`}
|
||||
</style>
|
||||
</Head>
|
||||
<Page title="Apollo upload examples">
|
||||
<SingleUploader />
|
||||
<MultipleUploader />
|
||||
<UploadList />
|
||||
</div>
|
||||
</Page>
|
||||
|
||||
export default withData(HomePage)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user