Skip to content

Commit

Permalink
fix: profile get api의 queryKey 인식 오류 방지 위해 queryKey에 들어가는 id는 string으…
Browse files Browse the repository at this point in the history
…로 통일
  • Loading branch information
wokbjso committed Aug 28, 2024
1 parent a23863f commit d0ed8e8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions features/profile/hooks/use-profile-data.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ import { fetchProfileData } from '../apis/fetch-profile-data';

export const useProfileData = (id?: number) => {
return useQuery<ProfileProps['data']>({
queryKey: ['profileData', id],
queryKey: ['profileData', String(id)],
queryFn: () =>
fetchProfileData(id as number).then((data) => {
fetchProfileData(Number(id)).then((data) => {
return data.data;
}),
enabled: !!id,
Expand Down

0 comments on commit d0ed8e8

Please sign in to comment.