diff --git a/src/features/Pokedex/Pokedex.tsx b/src/features/Pokedex/Pokedex.tsx
index 4bd00db..639b128 100644
--- a/src/features/Pokedex/Pokedex.tsx
+++ b/src/features/Pokedex/Pokedex.tsx
@@ -9,15 +9,23 @@ const Pokedex = () => {
const isLoadingPokemons = useAppSelector(
state => state.pokedex.isLoadingPokemons,
);
+ const selectedType = useAppSelector(state => state.pokedex.selectedType);
+ const selectedSort = useAppSelector(state => state.pokedex.selectedSort);
+
const pokemonList = useAppSelector(state => state.pokedex.pokemonList);
+ const filteredPokemonList = pokemonList.filter(pokemon => {
+ selectedType === 'All Types' ||
+ pokemon.types.some(type => type.type.name === selectedType);
+ });
+
return (
<>
{isLoadingPokemons ? (
) : (
- pokemonList.map(pokemon => (
+ filteredPokemonList.map(pokemon => (