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

Make useSearch isomorphic #1025

Merged
merged 2 commits into from
Jan 22, 2025
Merged

Conversation

CharlyMartin
Copy link
Collaborator

@CharlyMartin CharlyMartin commented Jan 22, 2025

Note

This is PR 2/3 to make our hooks isomorphic, meaning they don't contain any server or client-specific code and can run in both environments. More information on the motivation is in the Notion ticket.

📝 Description

This PR is about making useSearch isomorphic.

🛠️ Key Changes

  • Remove NextServerSearchParams from useSearch props and use searchQuery instead
  • Implement changes on all pages
  • Clean the hook

🧪 How to Test

Make sure the search works the same as on fil.org

Copy link

vercel bot commented Jan 22, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
filecoin-foundation-site ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 22, 2025 2:48pm

Copy link

@CharlyMartin CharlyMartin changed the title UXIT-2020/isomorphic-search-hook Make useSearch isomorphic Jan 22, 2025
@CharlyMartin CharlyMartin marked this pull request as ready for review January 22, 2025 10:06
barbaraperic
barbaraperic previously approved these changes Jan 22, 2025
Copy link
Collaborator

@barbaraperic barbaraperic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Base automatically changed from UXIT-2020/isomorphic-pagination-hook to main January 22, 2025 14:39
@CharlyMartin CharlyMartin dismissed barbaraperic’s stale review January 22, 2025 14:39

The base branch was changed.

@CharlyMartin CharlyMartin force-pushed the UXIT-2020/isomorphic-search-hook branch from 67cc96b to ab52df5 Compare January 22, 2025 14:45
@CharlyMartin CharlyMartin merged commit 80a4880 into main Jan 22, 2025
4 of 5 checks passed
@CharlyMartin CharlyMartin deleted the UXIT-2020/isomorphic-search-hook branch January 22, 2025 14:45
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.

2 participants