Created
June 11, 2020 16:03
-
-
Save alexandr-g/f2230a35f705cccb4077521476335240 to your computer and use it in GitHub Desktop.
pages/index.js
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
// pages/index.js | |
import Head from 'next/head' | |
import Users from '../components/Users' | |
import { withApollo } from '../apollo/client' | |
const Index = () => { | |
return ( | |
<div className="container"> | |
<Head> | |
<title>Create Next App</title> | |
<link rel="icon" href="/favicon.ico" /> | |
</Head> | |
<main> | |
<Users /> | |
</main> | |
<footer> | |
<a | |
href="https://vercel.com?utm_source=create-next-app&utm_medium=default-template&utm_campaign=create-next-app" | |
target="_blank" | |
rel="noopener noreferrer" | |
> | |
Powered by{' '} | |
<img src="/vercel.svg" alt="Vercel Logo" className="logo" /> | |
</a> | |
</footer> | |
<style jsx>{` | |
.container { | |
min-height: 100vh; | |
padding: 0 0.5rem; | |
display: flex; | |
flex-direction: column; | |
justify-content: center; | |
align-items: center; | |
} | |
main { | |
padding: 5rem 0; | |
flex: 1; | |
display: flex; | |
flex-direction: column; | |
justify-content: center; | |
align-items: center; | |
} | |
footer { | |
width: 100%; | |
height: 100px; | |
border-top: 1px solid #eaeaea; | |
display: flex; | |
justify-content: center; | |
align-items: center; | |
} | |
footer img { | |
margin-left: 0.5rem; | |
} | |
footer a { | |
display: flex; | |
justify-content: center; | |
align-items: center; | |
} | |
a { | |
color: inherit; | |
text-decoration: none; | |
} | |
.description { | |
line-height: 1.5; | |
font-size: 1.5rem; | |
} | |
.logo { | |
height: 1em; | |
} | |
`}</style> | |
<style jsx global>{` | |
html, | |
body { | |
padding: 0; | |
margin: 0; | |
font-family: -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Oxygen, | |
Ubuntu, Cantarell, Fira Sans, Droid Sans, Helvetica Neue, sans-serif; | |
} | |
* { | |
box-sizing: border-box; | |
} | |
`}</style> | |
</div> | |
) | |
} | |
export default withApollo(Index) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment