Created
April 20, 2019 22:05
-
-
Save treyhuffine/42ee041826f7520ef4ecffdaa4fd40e0 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 * as React from 'react'; | |
import { useLaunchProfileQuery } from '../../generated/graphql'; | |
import LaunchProfile from './LaunchProfile'; | |
const LaunchProfileContainer = () => { | |
const { data, error, loading } = useLaunchProfileQuery({ variables: { id: '42' } }); | |
if (loading) { | |
return <div>Loading...</div>; | |
} | |
if (error) { | |
return <div>ERROR</div>; | |
} | |
if (!data) { | |
return <div>Select a flight from the panel</div>; | |
} | |
return <LaunchProfile data={data} />; | |
}; | |
export default LaunchProfileContainer; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment