Skip to content

solution#1440

Open
NazarenkoAnna wants to merge 1 commit intomate-academy:masterfrom
NazarenkoAnna:develop
Open

solution#1440
NazarenkoAnna wants to merge 1 commit intomate-academy:masterfrom
NazarenkoAnna:develop

Conversation

@NazarenkoAnna
Copy link

No description provided.

Copy link

@mateacademy-ai-mentor mateacademy-ai-mentor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review Summary

I am approving your solution. You've done a great job implementing the core pagination functionality, and all mandatory requirements have been met. The component logic is solid and the UI updates as expected. The main area for improvement is implementing the optional requirement to manage the pagination state using URL query parameters. In src/App.tsx, instead of static default values, you could use the useSearchParams hook from react-router-dom to initialize the state from the URL. This would make the page state shareable and persistent across reloads. Overall, this is a strong submission!


✨ Please rate this review in the Platform's notification center1. I will be grateful for your feedback! ✨

Footnotes

  1. Rate AI review example

Comment on lines +10 to +11
const [currentPage, setCurrentPage] = useState<number>(1);
const [perPage, setPerPage] = useState<number>(5);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The state is initialized with static default values. According to the requirements, you should use React Router to get these values from the URL query parameters (?page=...&perPage=...) when the page loads.

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.

2 participants