Open ABoyWithALaptop opened 1 year ago
Nice works,
Result: ✅
Check your error description, and password validation required field https://github.com/ABoyWithALaptop/df-frontend-2023/blob/78fed9a5494c1686baec9f51cd6b984469c85397/assignment-6/src/app/login/page.tsx#L15-L18
For authentication you should included all methods and status for handling in a context for easier maintaining https://github.com/ABoyWithALaptop/df-frontend-2023/blob/78fed9a5494c1686baec9f51cd6b984469c85397/assignment-6/src/app/login/page.tsx#L28-L50
Should validate on the FE first before calling API for create/edit the book, and must show the error message to notice the user
Can consider refactor these input code to a minor components and reuse it https://github.com/ABoyWithALaptop/df-frontend-2023/blob/78fed9a5494c1686baec9f51cd6b984469c85397/assignment-6/src/app/sign-up/page.tsx#L113-L130
<FormLabel ....>
<FormInput errorMessage={errorMessage} .... />
</FormLabel>
You should use form
element for handling Enter
event instead of doing this approach
https://github.com/ABoyWithALaptop/df-frontend-2023/blob/78fed9a5494c1686baec9f51cd6b984469c85397/assignment-6/src/components/SearchingBar/index.tsx#L34-L70
You can filter the books on the book table component before put it to render instead of make a global state for it, that make the code redundant and messed. Can consider use sync URL state for page and search query to achieve it https://github.com/ABoyWithALaptop/df-frontend-2023/blob/78fed9a5494c1686baec9f51cd6b984469c85397/assignment-6/src/components/SearchingBar/index.tsx#L22-L30
And check comments on previous assignments for improving your code