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

fix: 기록 생성 or 수정에서 이미 한번 버튼을 눌렀다면 다시 눌렀을 때 api 요청 막음 처리 #223

Merged
merged 2 commits into from
Aug 26, 2024
Merged
Changes from 1 commit
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
1 change: 1 addition & 0 deletions features/record/components/organisms/form.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,7 @@ export function Form() {
// eslint-disable-next-line @typescript-eslint/no-unused-vars
const { poolName, laneMeter, totalDistance, ...restData } = data;
const submitData = modifySubmitData(restData);
if (isLoading) return;
Copy link
Member

Choose a reason for hiding this comment

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

onSubmit 이벤트 최상위에 넣어주면 좋을 것 같습니다.
추가로 버튼 loading 상태일 때 button을 disabled 시켜주는 처리도 필요할 것 같아요!

handlers.onChangeIsLoading(true);
if (isEditMode) {
//이미지가 수정 되었을 때
Expand Down
Loading