Created
February 21, 2020 16:08
-
-
Save r3dm1ke/6461b0c13d5f4d3bc0ba611731ecf746 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| import React, {useState} from 'react'; | |
| import { ApolloProvider } from '@apollo/react-hooks'; | |
| import client from './client'; | |
| import {Typography, Container, makeStyles} from "@material-ui/core"; | |
| import RepositoryList from "./RepositoryList"; | |
| import SearchBar from "./SearchBar"; | |
| const useStyles = makeStyles({ | |
| title: { | |
| marginTop: '1rem', | |
| marginBottom: '1rem', | |
| textAlign: 'center' | |
| } | |
| }); | |
| const App = () => { | |
| const classes = useStyles(); | |
| const [searchTerm, setSearchTerm] = useState(''); | |
| return ( | |
| <ApolloProvider client={client}> | |
| <Container maxWidth={'sm'}> | |
| <Typography variant={'h3'} className={classes.title}>GraphQL Github Client</Typography> | |
| <SearchBar value={searchTerm} onChange={setSearchTerm}/> | |
| <RepositoryList searchTerm={searchTerm}/> | |
| </Container> | |
| </ApolloProvider> | |
| ); | |
| }; | |
| export default App; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment