-
Notifications
You must be signed in to change notification settings - Fork 110
nuqs implementation #255
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
base: main
Are you sure you want to change the base?
nuqs implementation #255
Conversation
Replaces manual search query handling with nuqs's useQueryState for improved URL query management in the search form. Adds nuqs dependency to package.json.
Replaces manual URLSearchParams and next/navigation search param handling with nuqs useQueryState and useQueryStates in pagination, sorter, and stars-filter components. Simplifies state management and improves consistency for query parameter updates across repo listing UI.
Resolve Conflicts
|
@offbeatjs is attempting to deploy a commit to the Max Programming's projects Team on Vercel. A member of the Team first needs to authorize it. |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
@offbeatjs you didn't really install |
|
I don't upload the lockfiles, I'll spin up a codespace since I'm outstation and install nuqs and create the change |
Co-authored-by: offbeatjs <193760898+offbeatjs@users.noreply.github.com>
Add nuqs to pnpm lockfile
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.
In /repos/[language]/page.tsx is where the build error occurs because the searchParams prop is being passed in to Pagination component but it has been removed here
It'd be much better to try and run the build command locally first and then push the code :)
Removed searchParams prop from Pagination component.
Remove searchParams from Pagination component
max-programming
left a comment
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.
Build error
21:38:37.668 Error: [nuqs] nuqs requires an adapter to work with your framework.
This pull request refactors how query parameters are managed across the repository search, sorting, filtering, and pagination components. The main change is replacing manual URL and query string manipulation with the
nuqslibrary's hooks, leading to cleaner code and more reliable state management for the UI. This affects how search queries, sorting, filtering, and pagination are handled and synchronized with the URL.Query parameter management improvements:
search-form.tsx,pagination.tsx,sorter.tsx, andstars-filter.tsxwithnuqshooks (useQueryState,useQueryStates). This simplifies state updates and ensures UI state is always in sync with the URL. [1] [2] [3] [4]Search and filter UX enhancements:
search-form.tsx) to usenuqsfor the search query parameter, improving reliability and making it easier to reset and update the search state. [1] [2] [3]stars-filter.tsx) to usenuqsfor star range and pagination parameters, simplifying filter logic and ensuring correct updates when the user interacts with the filter.Sorting and navigation improvements:
sorter.tsxto usenuqsfor sort field, order, and language parameters, removing reliance onURLSearchParamsand streamlining the code for generating navigation links. [1] [2] [3]Pagination update:
nuqsfor page parameter management, removing the need to passsearchParamsas a prop and simplifying page changes. [1] [2]Dependency addition:
nuqspackage topackage.jsonto enable the new query state management.