Conversation
Dependency Review✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.Snapshot WarningsEnsure that dependencies are being submitted on PR branches and consider enabling retry-on-snapshot-warnings. See the documentation for more information and troubleshooting advice. Scanned FilesNone |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 11f428761e
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| useEffect(() => { | ||
| if (!pokemon?.location_area_encounters) return | ||
|
|
There was a problem hiding this comment.
Reset encounter state before fetching a new Pokémon
When pokemon changes, the effect starts a new fetch but never clears locations or locationsError first. This means switching Pokémon can temporarily show the previous Pokémon’s encounter chips, and after any failed request the error banner can persist for subsequent successful selections (because locationsError is never set back to false). Resetting both pieces of state at the start of the effect avoids stale/incorrect UI data.
Useful? React with 👍 / 👎.
No description provided.