Skip to content

Commit

Permalink
fix: 계좌번호 수정되지 않던 버그 해결 (#691)
Browse files Browse the repository at this point in the history
  • Loading branch information
jinhokim98 authored Oct 2, 2024
1 parent a491203 commit d78b508
Showing 1 changed file with 1 addition and 15 deletions.
16 changes: 1 addition & 15 deletions client/src/hooks/useAccount.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,22 +57,8 @@ const useAccount = () => {
setTimeout(() => setIsPasting(false), 0);
};

const getChangedField = () => {
const changedField: Partial<Event> = {};

if (bankNameState.trim() !== '' && bankName !== bankNameState) {
changedField.bankName = bankNameState;
}

if (accountNumberState.trim() !== '' && accountNumber !== accountNumberState) {
changedField.accountNumber = accountNumberState;
}

return changedField;
};

const enrollAccount = async () => {
await patchEventOutline(getChangedField());
await patchEventOutline({bankName: bankNameState, accountNumber: accountNumberState});
};

useEffect(() => {
Expand Down

0 comments on commit d78b508

Please sign in to comment.