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

Marcin Fabicki task solution #3

Open
wants to merge 8 commits into
base: main
Choose a base branch
from

Conversation

Fabi0o
Copy link

@Fabi0o Fabi0o commented Jun 23, 2024

Hello there!

Here is my solution for the task.

Some explanation:

  • SSR: For the client side I used the SSR approach because imo it's the best practice here (better UX, faster initial load time, predictable performance)
  • Pagination Metadata: In the lib/products.ts merge function I've decided to return the pagination metadata with the products list, because of that I had to change the test cases (hope I was allowed to do that🙏) to match my approach
  • Homepage redirection: Added redirection functionality when the user requests /products/[page] without the dynamic segment
  • Error Handling: Added error handling to the API endpoint when the user requests a page that doesn't exist and additionally added an error view with the button to go back to the home page

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.

1 participant