()
| 21 | interface ProfileProps {} |
| 22 | |
| 23 | const Profile: React.FC<ProfileProps> = () => { |
| 24 | const { data, loading, error } = useQuery<GetMyTripsTypes.GetMyTrips>(GET_MY_TRIPS, { fetchPolicy: 'network-only' }); |
| 25 | if (loading) return <Loading />; |
| 26 | if (error) return <p>ERROR: {error.message}</p>; |
| 27 | if (data === undefined) return <p>ERROR</p>; |
| 28 | |
| 29 | return ( |
| 30 | <Fragment> |
| 31 | <Header>My Trips</Header> |
| 32 | {data.me && data.me.trips.length ? data.me.trips.map((launch: any) => <LaunchTile key={launch.id} launch={launch} />) : <p>You haven't booked any trips</p>} |
| 33 | </Fragment> |
| 34 | ); |
| 35 | }; |
| 36 | |
| 37 | export default Profile; |
nothing calls this directly
no outgoing calls
no test coverage detected