Skip to content

Commit

Permalink
Merge pull request #144 from Together42/139-rotation_bug
Browse files Browse the repository at this point in the history
�회원가입 페이지 및 로테이션 문구 수정
  • Loading branch information
Jiwon-Woo committed Dec 20, 2023
2 parents c290b69 + 8de94b5 commit 18fc968
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 8 deletions.
16 changes: 10 additions & 6 deletions src/components/Auth/AuthSignUp.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,24 +20,30 @@ const AuthSignUp = () => {

const handleSubmit = (e: any) => {
e.preventDefault();
const nickname = e.target[0].value;
const nicknameRegex = /^[a-zA-Z0-9-]+$/;
if (!nicknameRegex.test(nickname)) {
setNicknameError(true);
return;
}
if (!e.target[0].value) {
setNicknameError(true);
return;
}
apiClient
.post('/auth/signup', {
nickname: e.target[0].value,
slackId: e.target[1].value,
slackId: '',
imageUrl: profileImage,
})
.then((res) => {
saveToken(res.data.access_token);
setLoginState(() => {
return {
id: res.data.id,
id: e.target[0].value,
isLogin: true,
isAdmin: false,
profileUrl: res.data.url,
profileUrl: profileImage,
};
});
navigate('/');
Expand All @@ -61,9 +67,7 @@ const AuthSignUp = () => {
{openProfileModal && <ProfileModal />}
<form className={`authForm`} onSubmit={handleSubmit}>
<input type="text" placeholder="닉네임을 입력해주세요" maxLength={10} className={`authForm--input`} />
{nicknameError && <p className={`authForm--error_message`}>닉네임을 입력해주세요.</p>}
<br />
<input type="text" placeholder="slack id" maxLength={20} className={`authForm--input`} />
{nicknameError && <p className={`authForm--error_message`}>닉네임은 영어대소문자, 숫자 그리고 '-'만 허용합니다.</p>}
<br />
<button className={`authForm--button`}>Sign Up</button>
</form>
Expand Down
3 changes: 1 addition & 2 deletions src/components/Rotation/Rotation.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -240,9 +240,8 @@ const SelectDateNoticeBox = ({ isSubmit }: { isSubmit: boolean }) => (
</>
) : (
<>
<p>참여가 어려운 날짜를 선택해주세요 !</p>
<p>참여가 어려운 날짜를 선택해주세요!</p>
<p>해당 날짜를 고려해서 랜덤 매칭이 이루어집니다</p>
<p>(필수 사항은 아닙니다)</p>
</>
)}
</div>
Expand Down

0 comments on commit 18fc968

Please sign in to comment.