• 카테고리

    질문 & 답변
  • 세부 분야

    풀스택

  • 해결 여부

    미해결

failed to sign up 해결이 안됩니다 ㅠㅠ

22.02.23 01:21 작성 조회수 153

0

Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'push')

 

페이지 콘솔창에서 확인해보니 이런 오류가 나있고 계속 failed to sign up이 뜹니다

다른분들의 답변에서도 해결책을 찾을 수 없어 도움 청합니다 ... 

포스트맨 사용하니 register success가 나오는거 같은데,, 

깃허브 주소 첨부합니다ㅠ

 

https://github.com/aurpo1/boilerplate

답변 1

답변을 작성해보세요.

1

aurpo1님의 프로필

aurpo1

질문자

2022.02.23

 
 
    dispatch(registerUser(body))
      .then(response => {
        if(response.payload.success) {
          navigate("/login")
        } else {  
          alert('Failed to sign up')
        }
    })
 
 
aurpo1님의 프로필

aurpo1

질문자

2022.02.23

dispatch 부분을 이렇게 수정하였습니다

react-router-dom 이 v6으로 업데이트 돼서

이전 로그인 부분에서도 이런식으로 했었는데 깜빡하고 이쪽은 안바꾸니까 계속 에러가 났네요ㅎㅠ