From adb9ddc2460636e44019d3902017b50aa581ef2b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B9=80=EC=A7=84=ED=98=B8?= Date: Tue, 24 Sep 2024 17:56:51 +0900 Subject: [PATCH 1/2] =?UTF-8?q?fix:=20can=20submit=20=EC=A1=B0=EA=B1=B4?= =?UTF-8?q?=EC=9D=B4=20=EC=9E=98=EB=AA=BB=EB=90=90=EB=8D=98=20=EB=B2=84?= =?UTF-8?q?=EA=B7=B8=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- client/src/hooks/useAccount.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/client/src/hooks/useAccount.ts b/client/src/hooks/useAccount.ts index 4e3e83dfc..ddda966a9 100644 --- a/client/src/hooks/useAccount.ts +++ b/client/src/hooks/useAccount.ts @@ -46,11 +46,11 @@ const useAccount = () => { }; useEffect(() => { - const existEmptyField = bankName.trim() === '' && accountNumber.trim() === ''; + const existEmptyField = bankNameState.trim() === '' || accountNumberState.trim() === ''; const isChanged = bankName !== bankNameState || accountNumber !== accountNumberState; setCanSubmit(!existEmptyField && isChanged); - }, [bankName, accountNumber, bankNameState, accountNumberState]); + }, [bankNameState, accountNumberState]); return { bankName: bankNameState, From 097e4ebba2b21bbf553f13a8a8725df60244ef1e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B9=80=EC=A7=84=ED=98=B8?= Date: Tue, 24 Sep 2024 21:08:50 +0900 Subject: [PATCH 2/2] =?UTF-8?q?fix:=20=EC=83=88=EB=A1=9C=EC=9A=B4=20?= =?UTF-8?q?=EB=8D=B0=EC=9D=B4=ED=84=B0=EA=B0=80=20=EB=B9=88=20=EA=B0=92?= =?UTF-8?q?=EC=9D=B8=EC=A7=80=EB=A5=BC=20=EC=B2=B4=ED=81=AC=ED=95=98?= =?UTF-8?q?=EB=8A=94=20=EA=B2=83=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 --- client/src/hooks/useAccount.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/client/src/hooks/useAccount.ts b/client/src/hooks/useAccount.ts index ddda966a9..288432800 100644 --- a/client/src/hooks/useAccount.ts +++ b/client/src/hooks/useAccount.ts @@ -30,11 +30,11 @@ const useAccount = () => { const getChangedField = () => { const changedField: Partial = {}; - if (bankName.trim() !== '' && bankName !== bankNameState) { + if (bankNameState.trim() !== '' && bankName !== bankNameState) { changedField.bankName = bankNameState; } - if (accountNumber.trim() !== '' && accountNumber !== accountNumberState) { + if (accountNumberState.trim() !== '' && accountNumber !== accountNumberState) { changedField.accountNumber = accountNumberState; }