Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FE] 계좌번호 수정이 되지 않는 문제 #691

Merged
merged 1 commit into from
Oct 2, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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});
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

};
Comment on lines 60 to 62
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

확실히 백엔드와의 소통이 정말정말 중요하다고 느낀 문제...
간단한 수정 내용이지만 고생 많았어요~
진짜 발견 못할뻔...


useEffect(() => {
Expand Down
Loading