Right now when user create or delete resumes, we send two requests:
POST /resumes or DELETE /resumes/:slug
GET /resumes for a refetch of all resumes and refresh the whole resume list
We can instead, first update the zustand resumes store when create/delete resumes (this would be instant), and then after POST /resumes or DELETE /resumes/:slug respond, we check the status code and act accordingly.
Acceptance Criteria
the UI latency for create/delete resumes should be removed
Description
Right now there's 2-4 seconds latency when users create or delete resumes, we can optimize this and give users instant feedbacks.
Demo:
https://github.com/user-attachments/assets/df25627c-9fbd-4a57-8047-14ec4c66b62b
[Optional] Possible Solutions
Right now when user create or delete resumes, we send two requests:
POST /resumes
orDELETE /resumes/:slug
GET /resumes
for a refetch of all resumes and refresh the whole resume listWe can instead, first update the zustand resumes store when create/delete resumes (this would be instant), and then after
POST /resumes
orDELETE /resumes/:slug
respond, we check the status code and act accordingly.Acceptance Criteria
Todo list
NA