Index.tsx 527 B

1234567891011121314151617181920
  1. import React from 'react';
  2. import * as AppPokemonIndexQuery from '../../../__generated__/AppPokemonIndexQuery.graphql';
  3. import PokemonShow from './Show';
  4. function PokemonIndex(props: AppPokemonIndexQuery.AppPokemonIndexQueryResponse): React.ReactElement<void> {
  5. return (
  6. <ul>
  7. {props.pokemonConnection.edges.map(
  8. (edge): React.ReactNode => (
  9. <li key={edge.node.id}>
  10. <PokemonShow pokemon={edge.node} />
  11. </li>
  12. )
  13. )}
  14. </ul>
  15. );
  16. }
  17. export default PokemonIndex;