seif-y / PokeBuilder

1 stars 0 forks source link

[Bug] Modal Search and Pokedex Type Filter Fix #77

Closed seif-y closed 3 years ago

seif-y commented 3 years ago

Closes #76

Fixed a couple of issues.

Firstly, the pokemon list in the team builder search modal now properly resets when the modal closes. This means that the search filter form previous uses of the modal is no longer applied when you re-open it.

There was aalsonother issue with the filtering in the Pokedex. Since the filters were set using a global variable, they would not reset when the component rerendered. This has been fixed by exclusively using the useState and useEffect hooks for filtering, rather than having non-state variables.

Update: One other thing has been handled with this PR. TeamView and DetailedTeamView components now use the newly added pokemon data context instead of making new API calls