-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #79 from Kernel360/page-login
페이지 기능: 로그인 페이지 쿼리훅 제작
- Loading branch information
Showing
5 changed files
with
50 additions
and
8 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
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,16 @@ | ||
import { useMutation } from '@tanstack/react-query'; | ||
|
||
import { login } from '@remote/api/requests/auth/auth.post.api'; | ||
|
||
function useLogin() { | ||
return useMutation({ | ||
mutationFn: login, | ||
// eslint-disable-next-line no-console | ||
onSuccess: () => { console.log('요청 성공'); }, | ||
onError: () => { console.error('에러 발생'); }, | ||
// eslint-disable-next-line no-console | ||
onSettled: () => { console.log('결과에 관계 없이 무언가 실행됨'); }, | ||
}); | ||
} | ||
|
||
export default useLogin; |