From 96d7dc54fe1209252d0d97c907ce7e68c869a4a2 Mon Sep 17 00:00:00 2001 From: "lkh14011424@gmail.com" Date: Tue, 21 Jan 2025 01:26:34 +0900 Subject: [PATCH] =?UTF-8?q?[feat/#131]=20=ED=83=9C=EA=B7=B8=20=EA=B8=B0?= =?UTF-8?q?=EB=8A=A5=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/Modal/CreateCrewModal.tsx | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/src/components/Modal/CreateCrewModal.tsx b/src/components/Modal/CreateCrewModal.tsx index 2fbeb3a..51e0003 100644 --- a/src/components/Modal/CreateCrewModal.tsx +++ b/src/components/Modal/CreateCrewModal.tsx @@ -29,18 +29,11 @@ export const Tag = (props: ITag): React.ReactElement => { }`} onClick={onClickHandler} > - {name} + {`#${name}`} ) } -/** - * @todo - * 수정 상태에서 - * 이름 : 원래의 이름과 같은 경우에는 중복체크 할 필요 없음 - * 수정 : 변경 사항이 있는 경우에만 만들기 활성화 - */ - const CreateCrewModal = (props: ModalProps): React.ReactElement => { const { onClose, onSubmit, isModify } = props @@ -70,7 +63,7 @@ const CreateCrewModal = (props: ModalProps): React.ReactElement => { const onChangeTag = (e: React.ChangeEvent): void => { const { value } = e.target - if (/^[^\s]*$/.test(value) && value.length <= 10) setTag(value) + if (/^[^\s\{\}\[\]\/?.,;:|\)*~`!^\-_+<>@\#$%&\\\=\(\'\"]*$/.test(value) && value.length <= 10) setTag(value) else setIsComposing(false) } @@ -309,9 +302,10 @@ const CreateCrewModal = (props: ModalProps): React.ReactElement => { {/* tag list */}
{createTags(tags)}
{tags.length < 3 && ( -
+
+ {tag === "" || #}