Created
April 20, 2019 21:11
-
-
Save treyhuffine/c3e8afccad72ba096c9e64986e3895f5 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 { useLaunchListQuery } from '../../generated/graphql'; | |
import LaunchList from './LaunchList'; | |
const LaunchListContainer = () => { | |
const { data, error, loading } = useLaunchListQuery(); | |
if (loading) { | |
return <div>Loading...</div>; | |
} | |
if (error || !data) { | |
return <div>ERROR</div>; | |
} | |
return <LaunchList data={data} />; | |
}; | |
export default LaunchListContainer; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment