From 2d892b7e6845a3eac5b5569a09a5f81c97f06e75 Mon Sep 17 00:00:00 2001 From: sue hyeok chae <137467530+ienrum@users.noreply.github.com> Date: Mon, 22 Jul 2024 18:02:29 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20invalidateQueries=20['profile',myId]=20?= =?UTF-8?q?=ED=82=A4=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/apis/follow.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/apis/follow.ts b/src/apis/follow.ts index b122dbb7..ec487a79 100644 --- a/src/apis/follow.ts +++ b/src/apis/follow.ts @@ -74,6 +74,9 @@ export const usePostFollowAPI = (userId: string, myId: string) => { queryClient.invalidateQueries({ queryKey: ['profile', userId], }); + queryClient.invalidateQueries({ + queryKey: ['profile', myId], + }); queryClient.invalidateQueries({ queryKey: ['followees', myId], }); @@ -95,6 +98,9 @@ export const useDeleteFollowAPI = (userId: string, myId: string) => { queryClient.invalidateQueries({ queryKey: ['profile', userId], }); + queryClient.invalidateQueries({ + queryKey: ['profile', myId], + }); queryClient.invalidateQueries({ queryKey: ['followees', myId], });