From 4e4d84d6576e2cde8c3635d5ebfb4ce9255218f7 Mon Sep 17 00:00:00 2001 From: Doyun Lee Date: Fri, 19 Jan 2024 19:40:13 +0900 Subject: [PATCH 1/2] =?UTF-8?q?chore:=20stylelint=20=EC=A0=95=EB=A0=AC=20?= =?UTF-8?q?=EC=A0=81=EC=9A=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/NavigateLecueBook/NavigateLecueBook.style.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Home/components/NavigateLecueBook/NavigateLecueBook.style.ts b/src/Home/components/NavigateLecueBook/NavigateLecueBook.style.ts index f0f50e8e..3af55d88 100644 --- a/src/Home/components/NavigateLecueBook/NavigateLecueBook.style.ts +++ b/src/Home/components/NavigateLecueBook/NavigateLecueBook.style.ts @@ -9,8 +9,8 @@ export const MainWrapper = styled.div` export const IconWrapper = styled.section` display: flex; gap: 15.7rem; - align-items: baseline; justify-content: space-between; + align-items: baseline; width: 100%; padding: 6rem 1.6rem 5rem; From 206b34f733f05d00bfa1734d75126511df38b04a Mon Sep 17 00:00:00 2001 From: Doyun Lee Date: Fri, 19 Jan 2024 19:40:44 +0900 Subject: [PATCH 2/2] =?UTF-8?q?feat:=20=EA=B3=B5=EB=B0=B1=ED=8F=AC?= =?UTF-8?q?=ED=95=A8=202=EC=9E=90=20=EC=9D=B4=EC=83=81=20=EC=9E=85?= =?UTF-8?q?=EB=A0=A5=EC=8B=9C=20=EC=97=90=EB=9F=AC=20=ED=95=B8=EB=93=A4?= =?UTF-8?q?=EB=A7=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Register/components/NicknameInput/index.tsx | 6 ++++-- src/Register/hooks/usePatchNickname.ts | 3 +++ src/Register/page/index.tsx | 2 +- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/src/Register/components/NicknameInput/index.tsx b/src/Register/components/NicknameInput/index.tsx index abf0bffd..b56f0e34 100644 --- a/src/Register/components/NicknameInput/index.tsx +++ b/src/Register/components/NicknameInput/index.tsx @@ -62,9 +62,11 @@ function NicknameInput(props: NicknameInputProps) { {isValid === 'special' ? ( 특수문자/이모지는 사용 불가능해요 + ) : isValid === 'duplicate' ? ( + 이미 있는 닉네임이에요 ) : ( - isValid === 'duplicate' && ( - 이미 있는 닉네임이에요 + isValid === 'space' && ( + 마지막 공백 제외 2자 이상 입력해주세요 ) )} diff --git a/src/Register/hooks/usePatchNickname.ts b/src/Register/hooks/usePatchNickname.ts index e827b120..754ab483 100644 --- a/src/Register/hooks/usePatchNickname.ts +++ b/src/Register/hooks/usePatchNickname.ts @@ -30,6 +30,9 @@ const usePatchNickname = (props: usePatchNicknameProps) => { // 닉네임 중복코드 : 409 setIsValid('duplicate'); setIsActive(false); + } else if (code === 400) { + setIsValid('space'); + setIsActive(false); } else { console.error('usePatchNickname', err.response?.data); navigate('/error'); diff --git a/src/Register/page/index.tsx b/src/Register/page/index.tsx index e18c9071..85e453c7 100644 --- a/src/Register/page/index.tsx +++ b/src/Register/page/index.tsx @@ -6,7 +6,7 @@ import RegisterLogo from '../components/RegisterLogo'; import SubmitButton from '../components/SubmitButton'; import * as S from './Register.style'; -export type isValidState = 'valid' | 'special' | 'duplicate'; +export type isValidState = 'valid' | 'special' | 'duplicate' | 'space'; function Register() { const [isActive, setIsActive] = useState(false);