Skip to content

Conversation

@leoferreiralima
Copy link
Contributor

@leoferreiralima leoferreiralima commented May 20, 2024

Add sort by option to project list with 3 options

  • Number of Stars (default)
  • Newest
  • A to Z
image

fixes #19

@vercel
Copy link

vercel bot commented May 20, 2024

@leoferreiralima is attempting to deploy a commit to the Dub Team on Vercel.

A member of the Team first needs to authorize it.

@steven-tey
Copy link
Contributor

Thank you for the PR @leoferreiralima! Love this idea, but using searchParams at the page level will opt-the entire page into dynamic rendering. Any chance we can use a useSearchParams hook in the ProjectList component instead, and wrap that in Suspense?

@leoferreiralima
Copy link
Contributor Author

leoferreiralima commented May 31, 2024

Thank you for the PR @leoferreiralima! Love this idea, but using searchParams at the page level will opt-the entire page into dynamic rendering. Any chance we can use a useSearchParams hook in the ProjectList component instead, and wrap that in Suspense?

Really?? I really don't know about this, thanks to advice!

But to useSearchParams we need a client component, i don't know how this will work.
But I can figure out some solution for this.

Maybe make a path variable instead of query params, then we can generate static paths, what do you think?

@anil1047
Copy link

Yes this may be good idea for better search, But here these are sorted based on the popularity. Sorting by popularity is helpful for contributors to find the most popular projects. We can also integrate sorting options from React Search UI, such as A to Z, Z to A, and Most Relevant

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.

Add other sorts

3 participants