Skip to content

Commit

Permalink
fix: 객체 destructing이 안되어 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
xodms0309 committed Nov 5, 2023
1 parent 28e8c75 commit 0a85ff3
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ const useRecipeFavoriteMutation = (recipeId: number) => {
if (previousRequest) {
queryClient.setQueryData(queryKey, () => ({
...previousRequest,
newFavoriteRequest,
favorite: newFavoriteRequest.favorite,
favoriteCount: newFavoriteRequest.favorite
? previousRequest.favoriteCount + 1
: previousRequest.favoriteCount - 1,
Expand Down

0 comments on commit 0a85ff3

Please sign in to comment.