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,7 +55,8 @@ const Pokedex = () => {
{isLoadingPokemons ? ( {isLoadingPokemons ? (
<Loading /> <Loading />
) : ( ) : (
sortedFilteredPokemonCardList.map(pokemonCard => ( <div className="all__pokemons">
{sortedFilteredPokemonCardList.map(pokemonCard => (
<PokemonCard <PokemonCard
key={pokemonCard.id} key={pokemonCard.id}
id={pokemonCard.id} id={pokemonCard.id}
@ -63,7 +64,8 @@ const Pokedex = () => {
image={pokemonCard.image} image={pokemonCard.image}
types={pokemonCard.types} 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;
}