-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* style: User 타입 분리 * fix: 백엔드 계좌번호 구조 변경으로 인한 api 변동을 반영
- Loading branch information
1 parent
0cae926
commit bf40131
Showing
5 changed files
with
57 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
import {useMutation, useQueryClient} from '@tanstack/react-query'; | ||
|
||
import {RequestPatchUser, requestPatchUser} from '@apis/request/event'; | ||
|
||
import QUERY_KEYS from '@constants/queryKeys'; | ||
|
||
const useRequestPatchUser = () => { | ||
const queryClient = useQueryClient(); | ||
|
||
const {mutateAsync, ...rest} = useMutation({ | ||
mutationFn: (args: RequestPatchUser) => requestPatchUser({...args}), | ||
onSuccess: () => { | ||
queryClient.invalidateQueries({ | ||
queryKey: [QUERY_KEYS.event], | ||
}); | ||
}, | ||
}); | ||
|
||
return { | ||
patchUser: mutateAsync, | ||
...rest, | ||
}; | ||
}; | ||
|
||
export default useRequestPatchUser; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters