Skip to content
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

Capture research filters in URL #830

Closed
wants to merge 3 commits into from
Closed

Capture research filters in URL #830

wants to merge 3 commits into from

Conversation

JiginJayaprakash
Copy link
Contributor

@JiginJayaprakash JiginJayaprakash commented Nov 1, 2023

πŸ€– Generated by Copilot at ba7d812

Summary

βœ¨πŸ”§πŸ”

Improved the user experience of the research page by enabling URL-based filtering. Used React hooks to manage the state of the Research.jsx component and the URL search parameters.

We search for the truth in the dark web of doom
We sync our filters with the URL of gloom
We use the useEffect hook to unleash our power
We update the parameters with every hour

Walkthrough

  • Import useEffect hook from react to update URL search parameters based on filter state (link)
  • Use useEffect hook to set topics, locations, and authors search parameters when filteredTopics, filteredLocations, and filteredAuthors change in src/redesign/components/Research.jsx (link)

Fixes #823

On filter change , now the url also changes

@JiginJayaprakash JiginJayaprakash changed the title Capture research filters in URL #823 Capture research filters in URL Nov 1, 2023
@MaxGhenis
Copy link
Contributor

Could you run prettier to get CI to pass?

@JiginJayaprakash JiginJayaprakash closed this by deleting the head repository Nov 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Capture research filters in URL
2 participants