nguyenhoaikhang37 / df-frontend-2023

0 stars 0 forks source link

Submission for assignment 7 #7

Open nguyenhoaikhang37 opened 1 year ago

nguyenhoaikhang37 commented 1 year ago

// Demo link https://df-frontend-2023-ass7.vercel.app/

// Any notes for reviewers If the code lacks clarify or if there are any issue with the application, please don't hesitate to provide feedback. I'm open to suggestions and eager to improve. Thanks a lot <3

ngolapnguyen commented 1 year ago

Requirements

Result: ✅

Feedbacks

  1. Some auth issues:

    • I logged in but the header doesn't reload. I have to refocus or reload the page:
image image
  1. This confuses me:
image

mutate is basically telling SWR to update the request (e.g. refetching). Why are we calling mutate before login? 🤔

  1. I suggest using a UserContext or AuthContext where we put things like getMe, login, logout, etc. Just a pattern we'd like to use to manage auth stuff & have access to current user profile at a global level.

  2. ...