Open R-Jim opened 1 year ago
Nice works,
Result: ✅ passed
Should not refresh the login page after clicking on request login page
Got duplicated query in the get books request
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
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
Should create an API instance service for handling requests instead of define them in apps/api
folder
For a better UX you should show a loading state to inform user when has APIs requesting.
Should redirect user to homepage if user is authenticated ...
Link: https://df-frontend-2023-ashy.vercel.app