hydra
hydra copied to clipboard
feat: search results pagination
This PR will add pagination buttons to search results to show more search results
closes #357, and closes #292
Closes #369
Please, always add a screenshot when your PR is releated to UI stuff.
new translation keys are required for next_page and last_page
Could you please add the translation for en
at least as it is the default fallback? The others can be added later.
LGTM overall, nice work :)
@mohannadzidan u can use it actually
the only problem is that this file uses const { t } = useTranslation("home");
instead of const { t } = useTranslation("catalogue");
😅
I have updated the code to use next_page
, previous_page
keys from the catalogue namespace
@zamitto hey, this feature is ready to merge, can you please review the code?
hey @mohannadzidan , need some help here?
Hello @piradata and @zamitto
I've implemented the changes requested in the previous review:
- Moved pagination inlined styles to home.css for better separation of concerns.
- Updated the searchGames function signature for improved clarity and reusability.
- Added functionality to disable the "next" button when there are no more results to prevent unexpected behavior.
Please take another look at the code and let me know if everything looks good or if you have any further suggestions. Thanks!
@zamitto what do you think on this one?
@zamitto is this one stil relevant?
@zamitto is this one stil relevant?
Not anymore, we moved the search to our api We might eventually add pagination to it But, as now the results are much more relevant and gives what the user is search for, pagination is not a top priority right now