-
Notifications
You must be signed in to change notification settings - Fork 39
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Kunzite - Arshdeep C., Arianna W., Elizabeth Z., Abby C. #25
base: main
Are you sure you want to change the base?
Conversation
Co-authored-by: lizzach <[email protected]> Co-authored-by: avchauha <[email protected]>
…ards of selected board
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A very light bit of feedback.
setCardData((prev) => { | ||
return prev.map((card) =>{ | ||
if (id === card.id) { | ||
return {...card, likes_count: res.data.card.likes_count}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can replace the old card data in the list entirely with the result of the API call. This would allow the frontend to need to know nothing about what fields get updated for a like.
return res.data.card;
No description provided.