EddieHubCommunity / RepoRater

Rate GitHub Repos for Developer Experience (DX)
https://repo-rater.eddiehub.org
MIT License
155 stars 36 forks source link

[BUG] Search on User Rankings page not working #114

Open vneogi199 opened 10 months ago

vneogi199 commented 10 months ago

Has this bug been raised before?

Where did you find this bug?

production

Description

On the user ratings page, the search does not work. In the browser console you can see an error: Uncaught TypeError: t is not a function

Steps to Reproduce

  1. Go to user rankings page.
  2. Search anything in the search bar on the top.
  3. Users are not filtered.
  4. Browser console has an error: Uncaught TypeError: t is not a function

Screenshots

No response

Do you want to work on this issue?

Yes

If "yes" to above, please explain how you would technically implement this

In app/rankings/page.js, we aren't passing setKeyword callback to like we do in app/page.js. Need to pass this callback and filter the Users component with keyword by searching on name of the users

vneogi199 commented 10 months ago

We have the same issue on Add Ratings page. I think we should hide the search box here as there is nothing to search on this page.

eddiejaoude commented 10 months ago

Thank you for raising the bug.

I have assigned it to you

vneogi199 commented 10 months ago

I have disabled the search on the add ratings page.

But on the rankings page, my approach of searching users by passing setKeyword to SideNav won't work as Rankings page is a server component. Only solution I could find is to set the search keyword in the search params and extract it from there. Based on this I can filter the users. Is that a good solution?

adityaraute commented 7 months ago

Perhaps on the add ratings page, we could have a Global repo search, such that once a searched repo is selected, the URL can be auto-populated.