Skip to content
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

Merged
merged 3 commits into from
Sep 8, 2023

Conversation

imb96
Copy link
Member

@imb96 imb96 commented Sep 8, 2023

🪄 변경사항

회원가입 성공 / 실패 모달창 출력

  • 회원가입 성공시 로그인하러 가기 모달창
  • 회원가입 실패시 (중복된 이메일 시도시) 오류 모달창

🖥 결과 화면

스크린샷 2023-09-08 오후 3 47 25 스크린샷 2023-09-08 오후 3 48 03

✏️ PR 포인트

회원가입 성공시 로그인하러 가기 모달창이 출력되며 로그인하러 가기 버튼을 누르면 'login'페이지로 이동합니다.
중복된 이메일으로 회원가입 시도시 오류 모달창이 출력되며 확인 버튼을 누르면 모달창이 닫히고 다시 회원가입할 수 있습니다.

회원가입 성공시 로그인하러 가기 모달창
회원가입 실패시 (중복된 이메일 시도시) 오류 모달창
@@ -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';
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

USER_INPUT 으로 쓰시는 건 어떠실까요?!

@imb96 imb96 requested a review from nayeon-hub September 8, 2023 07:17
Copy link
Member

@sscoderati sscoderati left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

자잘한 부분 이외의 큰 에러는 없는 것 같습니다. LGTM 👍

Comment on lines 22 to 23
const [emailError, setEmailError] = useState<boolean>(false);
const [signupSuccess, setSignupSuccess] = useState<boolean>(false);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

timer는 사용중이지 않은 것 같습니다!

@imb96 imb96 merged commit 8d02365 into main Sep 8, 2023
@imb96 imb96 deleted the feat/signup/modal branch September 8, 2023 08:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants