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,