Open NguyenPhuLoc666666 opened 1 year ago
Hello @NguyenPhuLoc666666 , well done!
Final result: ✅ passed
We also have some comments for your work:
The search function isn't working; the app crashes when I try to search.
The No
column should display the current index instead of always showing 1 - 5 on every page.
I created a book belonging to the Software Development
topic, but it's displaying in the table under the Database
topic.
Since we're using React, whenever you update the books
state, React automatically re-renders the page and updates your table. So, you don't need to call the renderBooks(books)
function.
You have handleOpenDialog
and handleCloseDialog
functions to manage opening and closing modals. Why not include the logic for opening and closing the CreateBookModal
inside these functions instead of creating separate ones?
Your Button
component seems a bit unusual. There's no need to pass the data
property and then use it in the onClick
handler. Instead, you can use it like this:
<button onClick={() => handleOpenDialogCreate('dialogCreate')}>Add book</button>
link: https://df-frontend-2023-9182-nguyenphuloc666666.vercel.app/