Implemented pokedex list style

This commit is contained in:
Jason Zhu 2023-04-17 22:34:18 +10:00
parent 2857b1d131
commit 10442f9dc8
2 changed files with 18 additions and 9 deletions

View File

@ -55,15 +55,17 @@ const Pokedex = () => {
{isLoadingPokemons ? ( {isLoadingPokemons ? (
<Loading /> <Loading />
) : ( ) : (
sortedFilteredPokemonCardList.map(pokemonCard => ( <div className="all__pokemons">
<PokemonCard {sortedFilteredPokemonCardList.map(pokemonCard => (
key={pokemonCard.id} <PokemonCard
id={pokemonCard.id} key={pokemonCard.id}
name={pokemonCard.name} id={pokemonCard.id}
image={pokemonCard.image} name={pokemonCard.name}
types={pokemonCard.types} image={pokemonCard.image}
/> types={pokemonCard.types}
)) />
))}
</div>
)} )}
</> </>
); );

View File

@ -44,3 +44,10 @@ code {
align-items: center; align-items: center;
justify-content: center; justify-content: center;
} }
.all__pokemons {
display: flex;
flex-wrap: wrap;
align-items: center;
justify-content: center;
}