Created
April 20, 2019 21:11
-
-
Save treyhuffine/a76e0426f8547936c50187403634fff2 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