-
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.
[FE] 회원가입시 예외처리를 하고, 한줄평 글자 1칸초과하는것을 해결한다. (#1040)
- Loading branch information
Showing
8 changed files
with
50 additions
and
19 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,6 +3,7 @@ | |
"version": "1.0.0", | ||
"main": "index.tsx", | ||
"license": "MIT", | ||
"packageManager": "[email protected]", | ||
"scripts": { | ||
"build": "cross-env NODE_ENV=production API_ENV=production webpack --mode=production --config webpack.prod.js", | ||
"build:dev-fe": "cross-env NODE_ENV=production API_ENV=development webpack --mode=production --config webpack.prod.js", | ||
|
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,20 @@ | ||
import { useMutation, useQueryClient } from '@tanstack/react-query'; | ||
|
||
import { postSignUp } from '@/apis/user'; | ||
import useToast from '@/hooks/useToast'; | ||
|
||
const usePostSignUpQuery = () => { | ||
const client = useQueryClient(); | ||
client.setMutationDefaults(['auth', 'sign-up'], { onError: undefined }); | ||
const { showToast } = useToast(); | ||
return useMutation({ | ||
mutationKey: ['auth', 'sign-up'], | ||
mutationFn: postSignUp, | ||
onSuccess: () => { | ||
showToast({ message: '회원가입이 완료되었습니다.', type: 'confirm' }); | ||
}, | ||
throwOnError: false, | ||
}); | ||
}; | ||
|
||
export default usePostSignUpQuery; |
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