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 Page from '../components/page'
|
||||||
import withData from '../helpers/with-data'
|
|
||||||
import SingleUploader from '../components/single-uploader'
|
import SingleUploader from '../components/single-uploader'
|
||||||
import MultipleUploader from '../components/multiple-uploader'
|
import MultipleUploader from '../components/multiple-uploader'
|
||||||
import UploadList from '../components/upload-list'
|
import UploadList from '../components/upload-list'
|
||||||
|
import withData from '../helpers/with-data'
|
||||||
|
|
||||||
const HomePage = () =>
|
const HomePage = () =>
|
||||||
<div>
|
<Page title="Apollo upload examples">
|
||||||
<Head>
|
|
||||||
<title>Apollo upload examples</title>
|
|
||||||
<style>
|
|
||||||
{`
|
|
||||||
html {
|
|
||||||
font-family: sans-serif;
|
|
||||||
color: white;
|
|
||||||
background-color: #22a699;
|
|
||||||
}
|
|
||||||
body {
|
|
||||||
margin: 2em;
|
|
||||||
}
|
|
||||||
`}
|
|
||||||
</style>
|
|
||||||
</Head>
|
|
||||||
<SingleUploader />
|
<SingleUploader />
|
||||||
<MultipleUploader />
|
<MultipleUploader />
|
||||||
<UploadList />
|
<UploadList />
|
||||||
</div>
|
</Page>
|
||||||
|
|
||||||
export default withData(HomePage)
|
export default withData(HomePage)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user