From 7254b4e89c7ad399b64d86ba8ed98fbe223ac006 Mon Sep 17 00:00:00 2001 From: seo-wo <4nyth4me@gmail.com> Date: Wed, 20 Dec 2023 16:35:38 +0900 Subject: [PATCH 1/2] style: change description #139 --- src/components/Rotation/Rotation.tsx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/components/Rotation/Rotation.tsx b/src/components/Rotation/Rotation.tsx index 5792f4e..13e0186 100644 --- a/src/components/Rotation/Rotation.tsx +++ b/src/components/Rotation/Rotation.tsx @@ -240,9 +240,8 @@ const SelectDateNoticeBox = ({ isSubmit }: { isSubmit: boolean }) => ( ) : ( <> -

참여가 어려운 날짜를 선택해주세요 !

+

참여가 어려운 날짜를 선택해주세요!

해당 날짜를 고려해서 랜덤 매칭이 이루어집니다

-

(필수 사항은 아닙니다)

)} From 8de94b5b36c69a8cfb61b50b8770e19a25e175a8 Mon Sep 17 00:00:00 2001 From: seo-wo <4nyth4me@gmail.com> Date: Wed, 20 Dec 2023 16:36:41 +0900 Subject: [PATCH 2/2] feat: change signup page remove slackId form and check nickname --- src/components/Auth/AuthSignUp.tsx | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/src/components/Auth/AuthSignUp.tsx b/src/components/Auth/AuthSignUp.tsx index d11a8d5..0e98cf7 100644 --- a/src/components/Auth/AuthSignUp.tsx +++ b/src/components/Auth/AuthSignUp.tsx @@ -20,6 +20,12 @@ 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; @@ -27,17 +33,17 @@ const AuthSignUp = () => { 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('/'); @@ -61,9 +67,7 @@ const AuthSignUp = () => { {openProfileModal && }
- {nicknameError &&

닉네임을 입력해주세요.

} -
- + {nicknameError &&

닉네임은 영어대소문자, 숫자 그리고 '-'만 허용합니다.

}