TrungKien2705 / df-frontend-2023

https://trungkien-assignment-3.vercel.app/
1 stars 0 forks source link

Submission for assignment - 2 #3

Open TrungKien2705 opened 1 year ago

TrungKien2705 commented 1 year ago

Link demo: Link Function

  1. List Book: List of books corresponding to the topic.
  2. Search By Book: Search for books based on book title.
  3. Add, Edit and Delete Book: Add, edit and delete books.
  4. Responsive,Pagination and Light/Dark mode themes.
zlatanpham commented 1 year ago

Hello @TrungKien2705, good work!

Requirements

Final result: ✅ passed 90% of the requirements

Feedback

We also have some comments for your work:

  1. Please make an effort to keep your project clean by removing any unnecessary files that are not being used. For example, the app.jsx file appears to be unused. https://github.com/TrungKien2705/df-frontend-2023/blob/master/assignment-2/src/App.jsx#L3
  2. When making an API call, consider using try-catch to handle errors https://github.com/TrungKien2705/df-frontend-2023/blob/dac7aff7b80bc3b1d89a08575d1bdb9005015c0f/assignment-2/src/views/Book.jsx#L32
  3. There seems to be a bug in the delete function that prevents me from deleting a book after performing a filtered search.
  4. There appears to be a bug in the theme switcher, whereby the UI state fails to persist following a page refresh. image
  5. The function name handleClick could be more descriptive. Something like handlePageChange would be clearer. Or consider using directly the setCurrentPage function. https://github.com/TrungKien2705/df-frontend-2023/blob/dac7aff7b80bc3b1d89a08575d1bdb9005015c0f/assignment-2/src/components/Pagination.jsx#L15
  6. Consider hiding the pagination if there is only one page

🌟 It's good to see you use debounce for performance optimization https://github.com/TrungKien2705/df-frontend-2023/blob/dac7aff7b80bc3b1d89a08575d1bdb9005015c0f/assignment-2/src/views/Book.jsx#L50