Skip to content

Instantly share code, notes, and snippets.

@JeffML
Created June 2, 2019 18:45
Show Gist options
  • Save JeffML/d066f443b5de23eabf0d81b64db3721d to your computer and use it in GitHub Desktop.
Save JeffML/d066f443b5de23eabf0d81b64db3721d to your computer and use it in GitHub Desktop.
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