From dbc2cfdc5ea1b8ec96bf516b3a2795a0150c992a Mon Sep 17 00:00:00 2001 From: ccwnc Date: Mon, 1 Apr 2024 23:01:48 +0900 Subject: [PATCH 1/3] =?UTF-8?q?refactor:=20=EC=88=98=EC=A0=95=20=EB=AA=A8?= =?UTF-8?q?=EB=8B=AC=EC=9D=98=20=ED=85=8D=EC=8A=A4=ED=8A=B8=20=EC=88=98?= =?UTF-8?q?=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/editPage/EditForm/index.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/editPage/EditForm/index.tsx b/src/components/editPage/EditForm/index.tsx index 690a87a6..1204981d 100644 --- a/src/components/editPage/EditForm/index.tsx +++ b/src/components/editPage/EditForm/index.tsx @@ -374,9 +374,9 @@ const EditForm = ({ category, activityDetailData }: EditFormProps) => { 확인 From ad9823473e613b4ed228f24575dddb5751dbf675 Mon Sep 17 00:00:00 2001 From: ccwnc Date: Mon, 1 Apr 2024 23:07:04 +0900 Subject: [PATCH 2/3] =?UTF-8?q?refactor:=20title=EA=B3=BC=20discord?= =?UTF-8?q?=EC=9D=98=20=EA=B8=80=EC=9E=90=20=EC=88=98=20=EC=A0=9C=ED=95=9C?= =?UTF-8?q?=EC=9D=84=2050=2030=EC=9C=BC=EB=A1=9C=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/createPage/PostForm/index.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/components/createPage/PostForm/index.tsx b/src/components/createPage/PostForm/index.tsx index bb2c3c92..a3104296 100644 --- a/src/components/createPage/PostForm/index.tsx +++ b/src/components/createPage/PostForm/index.tsx @@ -216,9 +216,9 @@ const PostForm = ({ category }: PostFormProps) => { {recruitmentTypes.isOfflineOrOnline(price) && ( @@ -253,7 +253,7 @@ const PostForm = ({ category }: PostFormProps) => { name='discord' label='디스코드 링크' placeholder='https://discord.gg/초대코드' - maxLength={50} + maxLength={30} /> )} From c046eda911e7b2055493213ecaf1ca987c82c248 Mon Sep 17 00:00:00 2001 From: ccwnc Date: Mon, 1 Apr 2024 23:33:53 +0900 Subject: [PATCH 3/3] =?UTF-8?q?refactor:=20=EC=9D=B4=EB=AF=B8=EC=A7=80=20?= =?UTF-8?q?=EC=97=85=EB=A1=9C=EB=93=9C=20=EC=83=81=ED=83=9C=EC=97=90=20?= =?UTF-8?q?=EB=94=B0=EB=9D=BC=20=EB=93=B1=EB=A1=9D=20=EB=B0=8F=20=EC=88=98?= =?UTF-8?q?=EC=A0=95=20=EB=B2=84=ED=8A=BC=20=ED=99=9C=EC=84=B1=ED=99=94=20?= =?UTF-8?q?=EB=A1=9C=EC=A7=81=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/createPage/PostForm/index.tsx | 5 +++++ src/components/editPage/EditForm/index.tsx | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/src/components/createPage/PostForm/index.tsx b/src/components/createPage/PostForm/index.tsx index a3104296..c2878ed3 100644 --- a/src/components/createPage/PostForm/index.tsx +++ b/src/components/createPage/PostForm/index.tsx @@ -141,16 +141,19 @@ const PostForm = ({ category }: PostFormProps) => { // 이미지 관련 const [imageUrlsArray, setImageUrlsArray] = useState<{ activityImageUrl: string }[]>([]); + const [isImageUploadSuccess, setIsImageUploadSuccess] = useState(false); const { mutate: postFormImageMutation } = useMutation({ mutationFn: (uploadedFiles: File[]) => Activities.createImage(uploadedFiles), onSuccess: (uploadedImageUrls) => { setImageUrlsArray(uploadedImageUrls); + setIsImageUploadSuccess(false); }, }); const handleUpdateFiles = (uploadedFiles: File[]) => { postFormImageMutation(uploadedFiles); + setIsImageUploadSuccess(true); }; // 유저 데이터 관련 @@ -298,6 +301,7 @@ const PostForm = ({ category }: PostFormProps) => { theme='fill' size='medium' color='purple' + isDisabled={isImageUploadSuccess} onClick={handleSubmit(handleEditFormData)} > 등록 @@ -314,6 +318,7 @@ const PostForm = ({ category }: PostFormProps) => { theme='fill' size='large' color='purple' + isDisabled={isImageUploadSuccess} onClick={handleSubmit(handleEditFormData)} > 등록 diff --git a/src/components/editPage/EditForm/index.tsx b/src/components/editPage/EditForm/index.tsx index 1204981d..817cf1e5 100644 --- a/src/components/editPage/EditForm/index.tsx +++ b/src/components/editPage/EditForm/index.tsx @@ -187,16 +187,19 @@ const EditForm = ({ category, activityDetailData }: EditFormProps) => { // 이미지 관련 const [imageUrlsArray, setImageUrlsArray] = useState<{ activityImageUrl: string }[]>([]); + const [isImageUploadSuccess, setIsImageUploadSuccess] = useState(false); const { mutate: postFormImageMutation } = useMutation({ mutationFn: (uploadedFiles: File[]) => Activities.createImage(uploadedFiles), onSuccess: (uploadedImageUrls) => { setImageUrlsArray(uploadedImageUrls); + setIsImageUploadSuccess(false); }, }); const handleUpdateFiles = (uploadedFiles: File[]) => { postFormImageMutation(uploadedFiles); + setIsImageUploadSuccess(true); }; // 수정 버튼 클릭 후 데이터 가공 관련 @@ -346,6 +349,7 @@ const EditForm = ({ category, activityDetailData }: EditFormProps) => { theme='fill' size='medium' color='purple' + isDisabled={isImageUploadSuccess} onClick={handleSubmit(handleEditFormData)} > 수정 @@ -362,6 +366,7 @@ const EditForm = ({ category, activityDetailData }: EditFormProps) => { theme='fill' size='large' color='purple' + isDisabled={isImageUploadSuccess} onClick={handleSubmit(handleEditFormData)} > 수정