From 3783d1f49d06d59ab597dbc8dc21be0febdaaaeb Mon Sep 17 00:00:00 2001 From: jusohn Date: Fri, 25 Aug 2023 09:19:42 +0800 Subject: [PATCH] =?UTF-8?q?[FE]=20FIX:=203=EC=B8=B5=20=EB=B9=84=EB=B0=80?= =?UTF-8?q?=EB=B2=88=ED=98=B8=20=ED=99=95=EC=9D=B8=20=EB=AA=A8=EB=8B=AC?= =?UTF-8?q?=EC=9D=84=20=ED=86=B5=ED=95=B4=EC=84=9C=20=EB=B0=98=EB=82=A9=20?= =?UTF-8?q?=EC=8B=9C=EC=97=90=EB=8F=84=20=EB=B2=84=ED=8A=BC=EC=9D=84=20?= =?UTF-8?q?=EB=88=84=EB=A5=B4=EB=A9=B4=20response=20=EA=B0=80=20=EC=98=AC?= =?UTF-8?q?=20=EB=95=8C=EA=B9=8C=EC=A7=80=20=EB=B2=84=ED=8A=BC=EC=9D=84=20?= =?UTF-8?q?disable=20=ED=95=B4=20=EC=B6=94=EA=B0=80=20request=20=EB=A5=BC?= =?UTF-8?q?=20=EB=B3=B4=EB=82=B4=EC=A7=80=20=EB=AA=BB=ED=95=98=EA=B2=8C=20?= =?UTF-8?q?=EC=88=98=EC=A0=95=20#1315?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../PasswordCheckModal/PasswordCheckModal.container.tsx | 4 ++++ .../Modals/PasswordCheckModal/PasswordCheckModal.tsx | 3 ++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/frontend/src/components/Modals/PasswordCheckModal/PasswordCheckModal.container.tsx b/frontend/src/components/Modals/PasswordCheckModal/PasswordCheckModal.container.tsx index 1e54ac8f6..9c951dde5 100644 --- a/frontend/src/components/Modals/PasswordCheckModal/PasswordCheckModal.container.tsx +++ b/frontend/src/components/Modals/PasswordCheckModal/PasswordCheckModal.container.tsx @@ -32,6 +32,7 @@ const PasswordCheckModalContainer: React.FC<{ const currentCabinetId = useRecoilValue(currentCabinetIdState); const [modalTitle, setModalTitle] = useState(""); const [password, setPassword] = useState(""); + const [isLoading, setIsLoading] = useState(false); const [myInfo, setMyInfo] = useRecoilState(userState); const setTargetCabinetInfo = useSetRecoilState(targetCabinetInfoState); const setIsCurrentSectionRender = useSetRecoilState( @@ -50,6 +51,7 @@ const PasswordCheckModalContainer: React.FC<{ }; const onSendPassword = async () => { + setIsLoading(true); try { await axiosSendCabinetPassword(password); //userCabinetId 세팅 @@ -73,6 +75,7 @@ const PasswordCheckModalContainer: React.FC<{ setModalTitle(error.response.data.message); throw error; } finally { + setIsLoading(false); setShowResponseModal(true); } }; @@ -89,6 +92,7 @@ const PasswordCheckModalContainer: React.FC<{ ), closeModal: props.onClose, + isLoading: isLoading, }; return ( diff --git a/frontend/src/components/Modals/PasswordCheckModal/PasswordCheckModal.tsx b/frontend/src/components/Modals/PasswordCheckModal/PasswordCheckModal.tsx index 852bd9e39..51fa1c175 100644 --- a/frontend/src/components/Modals/PasswordCheckModal/PasswordCheckModal.tsx +++ b/frontend/src/components/Modals/PasswordCheckModal/PasswordCheckModal.tsx @@ -19,6 +19,7 @@ const PasswordCheckModal: React.FC<{ onClickProceed, cancelBtnText, closeModal, + isLoading, } = modalContents; const { isMultiSelect, closeMultiSelectMode } = useMultiSelect(); @@ -53,7 +54,7 @@ const PasswordCheckModal: React.FC<{ }} text={proceedBtnText || "확인"} theme="fill" - disabled={password.length < 4} + disabled={password.length < 4 || isLoading} />