R-Jim / df-frontend-2023

https://df-frontend-2023-assignment1.vercel.app
0 stars 0 forks source link

Submission for assignment 6 #23

Open R-Jim opened 1 year ago

R-Jim commented 1 year ago

Link: https://df-frontend-2023-ashy.vercel.app

chinhld12 commented 1 year ago

Nice works,

Requirements

Result: ✅ passed

Feedback

  1. Should not refresh the login page after clicking on request login page

  2. Got duplicated query in the get books request image

  3. Should create a util method for handling request error https://github.com/R-Jim/df-frontend-2023/blob/d9f85cdd810db4632f96bdbbc74b22653c38a825/assignment-6/src/app/books/%5Bid%5D/page.tsx#L20-L30 https://github.com/R-Jim/df-frontend-2023/blob/d9f85cdd810db4632f96bdbbc74b22653c38a825/assignment-6/src/app/api/auth/signin/page.tsx#L16-L30

  4. Many duplicate throw error code, can refactor it to a util and reuse it for handling throw specific error or just a Internal Error for a nicely inform message for the user. https://github.com/R-Jim/df-frontend-2023/blob/d9f85cdd810db4632f96bdbbc74b22653c38a825/assignment-6/src/app/api/topic/index.tsx#L20-L25

  5. Should create an API instance service for handling requests instead of define them in apps/api folder

  6. For a better UX you should show a loading state to inform user when has APIs requesting.

  7. Should redirect user to homepage if user is authenticated image ...