Created
June 2, 2019 18:45
-
-
Save JeffML/d066f443b5de23eabf0d81b64db3721d to your computer and use it in GitHub Desktop.
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
export default function Editor(props) { | |
const { setEditing } = props; | |
return ( | |
<Query query={LAUNCHES}> | |
{({ data, loading, error }) => { | |
if (loading) return <p>Loading...</p>; | |
if (error) return <p>ERROR</p>; | |
return ( | |
<Fragment> | |
<Submit /> | |
<input type='button' value='go back' onClick={() => setEditing(false)} style={{ marginTop: '20vh' }} /> | |
<table style={{ border: 'solid 1px' }}> | |
<tbody> | |
<tr> | |
<th>Site</th><th>Mission</th><th>Rocket</th><th>Book It!</th> | |
</tr> | |
{launchRows(data)} | |
</tbody> | |
</table> | |
</Fragment> | |
); | |
}} | |
</Query> | |
); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment