-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
✨ Feat: 회원가입 성공 / 실패 모달창 추가 #7
Conversation
회원가입 성공시 로그인하러 가기 모달창 회원가입 실패시 (중복된 이메일 시도시) 오류 모달창
src/pages/signup/index.tsx
Outdated
@@ -5,7 +5,7 @@ import UserInput from '@components/UserInput'; | |||
import Alert from '@/components/Alert'; | |||
import { isEmailOk, isNicknameOk, isPasswordOk } from './validations'; | |||
import { signUpUser } from '@/apis/user/getUserData'; | |||
import { USERINPUT } from './constants'; | |||
import { USERINPUT, MODAL } from './constants'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
USER_INPUT
으로 쓰시는 건 어떠실까요?!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
자잘한 부분 이외의 큰 에러는 없는 것 같습니다. LGTM 👍
src/pages/signup/index.tsx
Outdated
const [emailError, setEmailError] = useState<boolean>(false); | ||
const [signupSuccess, setSignupSuccess] = useState<boolean>(false); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
const [emailError, setEmailError] = useState<boolean>(false); | |
const [signupSuccess, setSignupSuccess] = useState<boolean>(false); | |
const [emailErrorCatched, setEmailErrorCatched] = useState<boolean>(false); | |
const [signupSuccessed, setSignupSuccessed] = useState<boolean>(false); |
boolean값에 걸맞는 네이밍 제안드립니다!
const [passwordConfirm, setPasswordConfirm] = useState<string>(''); | ||
const [emailError, setEmailError] = useState<boolean>(false); | ||
const [signupSuccess, setSignupSuccess] = useState<boolean>(false); | ||
const navigate = useNavigate(); | ||
let timer = 0; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
이 timer
는 사용중이지 않은 것 같습니다!
🪄 변경사항
회원가입 성공 / 실패 모달창 출력
🖥 결과 화면
✏️ PR 포인트
회원가입 성공시 로그인하러 가기 모달창이 출력되며 로그인하러 가기 버튼을 누르면 'login'페이지로 이동합니다.
중복된 이메일으로 회원가입 시도시 오류 모달창이 출력되며 확인 버튼을 누르면 모달창이 닫히고 다시 회원가입할 수 있습니다.