Skip to content

Commit

Permalink
fix: 비로그인 시 profile 요청 x
Browse files Browse the repository at this point in the history
  • Loading branch information
colorkite10 committed Dec 1, 2023
1 parent f55eff3 commit fce33ad
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/hooks/query/user/useMyProfile.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ export const QUERY_KEY = {
};

const useMyProfile = ({ setValue }: useMyProfile = {}) => {
const token = getStorage('token');
const { data } = useQuery({
queryKey: [QUERY_KEY.MY_PROFILE, QUERY_KEY.ID],
queryFn: () => getMyProfileInfo(),
Expand All @@ -25,6 +26,7 @@ const useMyProfile = ({ setValue }: useMyProfile = {}) => {
setValue('number', phoneNumber);
}
},
enabled: !!token,
});

return { data };
Expand Down

0 comments on commit fce33ad

Please sign in to comment.