File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -20,6 +20,7 @@ const StyledText = styled(Text)`
2020` ;
2121
2222const SignupPage = ( ) => {
23+ const [ description , setDescription ] = useState ( '' ) ;
2324 const [ showModal , setShowModal ] = useState ( false ) ;
2425 const [ showLoginModal , setShowLoginModal ] = useState ( false ) ;
2526 const navigate = useNavigate ( ) ;
@@ -47,6 +48,11 @@ const SignupPage = () => {
4748 setShowLoginModal ( true ) ;
4849 } catch ( e ) {
4950 e . message = 'SignupError' ;
51+ if ( e . code === 'ERR_BAD_REQUEST' ) {
52+ setDescription ( '이미 가입된 이메일입니다.' ) ;
53+ } else if ( e . code === 'ERR_NETWORK' ) {
54+ setDescription ( '네트워크 연결이 불안정합니다.' ) ;
55+ }
5056 setShowModal ( true ) ;
5157 throw e ;
5258 }
@@ -67,7 +73,7 @@ const SignupPage = () => {
6773 < Modal visible = { showModal } onClose = { closeModal } >
6874 < Modal . Content
6975 title = "회원가입에 실패했어요!"
70- description = " 이메일 및 비밀번호를 다시 확인해 주세요."
76+ description = { description ? description : ' 이메일 및 비밀번호를 다시 확인해 주세요.' }
7177 onClose = { closeModal }
7278 > </ Modal . Content >
7379 < Modal . Button onClick = { closeModal } > 확인</ Modal . Button >
You can’t perform that action at this time.
0 commit comments