From abb97595f7fcba68c13cd9f928c85a7cb170180c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EC=8A=B9=EC=9A=B0?= Date: Mon, 19 Feb 2024 21:52:07 +0900 Subject: [PATCH] =?UTF-8?q?feature-054=20:=20=EB=8B=89=EB=84=A4=EC=9E=84?= =?UTF-8?q?=20=EC=9C=A0=ED=9A=A8=EC=84=B1=EA=B2=80=EC=82=AC=20=EA=B8=B0?= =?UTF-8?q?=EB=8A=A5=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/NicknameModal.tsx | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/components/NicknameModal.tsx b/src/components/NicknameModal.tsx index adbc6f2..10d1dea 100644 --- a/src/components/NicknameModal.tsx +++ b/src/components/NicknameModal.tsx @@ -14,6 +14,8 @@ const NicknameModal = () => { const { createToast } = useCreateToast(); const setUserInfo = useSetRecoilState(userInfoState); + const NickNameRegex = /^[a-zA-Z0-9가-힣\s]*$/; + const testNickNameRegex = NickNameRegex.test(name); const refreshMyInfo = async () => { try { @@ -93,6 +95,11 @@ const NicknameModal = () => { /7(공백포함) + {!testNickNameRegex && ( + + *아쉽지만,이모티콘은 사용할 수 없어요 + + )} {name ? ( 등록하기 @@ -199,3 +206,10 @@ const TextDiv = styled.div` border-radius: 12px; margin-top: 48px; `; + +export const WarningMessage = styled.span` + align-self: flex-start; + margin: 0px 0px 12px 16px; + color: ${theme.color.red}; + ${theme.typography.Body3} +`; \ No newline at end of file