From d0ed8e84eeb6d26d603199b8e08c9a4358032d8c Mon Sep 17 00:00:00 2001 From: brian <90752841+wokbjso@users.noreply.github.com> Date: Wed, 28 Aug 2024 17:51:18 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20profile=20get=20api=EC=9D=98=20queryKey?= =?UTF-8?q?=20=EC=9D=B8=EC=8B=9D=20=EC=98=A4=EB=A5=98=20=EB=B0=A9=EC=A7=80?= =?UTF-8?q?=20=EC=9C=84=ED=95=B4=20queryKey=EC=97=90=20=EB=93=A4=EC=96=B4?= =?UTF-8?q?=EA=B0=80=EB=8A=94=20id=EB=8A=94=20string=EC=9C=BC=EB=A1=9C=20?= =?UTF-8?q?=ED=86=B5=EC=9D=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- features/profile/hooks/use-profile-data.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/features/profile/hooks/use-profile-data.tsx b/features/profile/hooks/use-profile-data.tsx index cf1d67d2..a262da94 100644 --- a/features/profile/hooks/use-profile-data.tsx +++ b/features/profile/hooks/use-profile-data.tsx @@ -6,9 +6,9 @@ import { fetchProfileData } from '../apis/fetch-profile-data'; export const useProfileData = (id?: number) => { return useQuery({ - queryKey: ['profileData', id], + queryKey: ['profileData', String(id)], queryFn: () => - fetchProfileData(id as number).then((data) => { + fetchProfileData(Number(id)).then((data) => { return data.data; }), enabled: !!id,