From 0a85ff30e965f33846c3e33849b673725a6d88e0 Mon Sep 17 00:00:00 2001 From: TaeeunKim Date: Sun, 5 Nov 2023 20:36:13 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20=EA=B0=9D=EC=B2=B4=20destructing?= =?UTF-8?q?=EC=9D=B4=20=EC=95=88=EB=90=98=EC=96=B4=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/hooks/queries/recipe/useRecipeFavoriteMutation.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/src/hooks/queries/recipe/useRecipeFavoriteMutation.ts b/frontend/src/hooks/queries/recipe/useRecipeFavoriteMutation.ts index 15711ae9..ae015303 100644 --- a/frontend/src/hooks/queries/recipe/useRecipeFavoriteMutation.ts +++ b/frontend/src/hooks/queries/recipe/useRecipeFavoriteMutation.ts @@ -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,