Skip to content
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

Open
wants to merge 82 commits into
base: main
Choose a base branch
from

Conversation

avchauha
Copy link

No description provided.

abbymachines and others added 30 commits July 17, 2023 15:43
Copy link

@anselrognlie anselrognlie left a 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};

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;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants