-
Notifications
You must be signed in to change notification settings - Fork 282
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: filter url parameters #996
feat: filter url parameters #996
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
@@ -29,6 +30,7 @@ export const ReasonFilterMenu: React.FC = () => { | |||
const [filterValues, setValues] = React.useState<string[]>( | |||
reasonFilterMenuOptions | |||
); | |||
const parameterName = "reasons"; |
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.
same here as above
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.
Didn't understand :( Is there a problem related to line 33?
Meanwhile, I can see your deployment has failed. To fix it
|
202e11d
to
a3cb348
Compare
Done, no errors occurred. |
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.
Seems good to me after the changes. Someone else also please take a look.
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.
Seems good, in general. Thank you for your contribution <3
There is one case that I figured after the deployment.
- If we select a few reason filters they are added to URL as expected.
- At first refresh filters are set on page load as expected.
- Once page load is done, even though filters are set. They are not on the url anymore.
I tried with following
https://deprem-yardim-frontend-dd8asetrr-afet.vercel.app/en?lat=37.535557424752696&lng=36.89483642578126&zoom=8&reasons=erzak%2Chayvanlar-icin-tedavi%2Ckonaklama%2Ckurtarma%2Clojistik%2Csu%2Cyagma%2Cyemek
If you refresh page twice, filters are gone from url.
https://deprem-yardim-frontend-dd8asetrr-afet.vercel.app/en?lat=37.535557424752696&lng=36.89483642578126&zoom=8
I revoked my approval, sorry for any inconveniences I made.
Deployment seems to have issues with translations but I don't think it is related to this PR 🤔
d1a6d71
to
17b4bc7
Compare
Some other params like |
we are doing a big refactor & redesign ty so much for the contribution and sorry for not taking this in. |
Description
discord username: Tundra#9805
**closes #893 **
Filter can now be able to get relevant URL parameters like 'lastTime=last30Minutes' and when a filter change, a parameter added to url to share the link.
## Things to check before creating a PR
Creating PR rules
Changes
How were these changes tested?
I've tried various combinations of URL parameters, no problem.
Example Link:
LOCALHOST/en?lat=38.094574707566274&lng=35.211181640625&zoom=7&lastTime=last3Hours&reasons=erzak%2Cyemek&channel=twitter
Test Configuration: