-
-
Notifications
You must be signed in to change notification settings - Fork 39
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add country list in settings page, using it as default country in eco-score #892
Conversation
✅ Deploy Preview for warm-cannoli-79bbb2 ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds good. I added some minor comments
); | ||
|
||
React.useEffect(() => { | ||
setSearchParams({ cc: selectedCountry }); | ||
}, [selectedCountry]); | ||
}, [selectedCountry, searchParams]); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't see why adding this dependency
}, [selectedCountry, searchParams]); | |
}, [selectedCountry]); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't see why adding this dependency
Actually it's kind of important, if you go to https://hunger.openfoodfacts.org/eco-score?cc=en%3Afrance
and click eco-score
in navbar, the query parameter disappears which is not an expected behavior.
What you think?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok, why not 👍
Co-authored-by: Alexandre Fauquette <[email protected]>
Co-authored-by: Alexandre Fauquette <[email protected]>
Co-authored-by: Alexandre Fauquette <[email protected]>
Co-authored-by: Alexandre Fauquette <[email protected]>
…in eco-score
What
Add country drop-down in settings page using
countries.json
.Settings it as default in
eco-score
page.Screenshot
Fixes bug(s)
Fix #887