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

Conversation

wokbjso
Copy link
Member

@wokbjso wokbjso commented Aug 26, 2024

🤔 어떤 문제가 발생했나요?

  • 기록 생성 or 수정하기 버튼을 연타했을 때, api 호출 시도가 계속 일어납니다.

🎉 어떻게 해결했나요?

  • 이미 클릭을 했다면 추후에 오는 요청은 전부 return 처리하였습니다.

📷 이미지 첨부 (Option)

  • NA

⚠️ 유의할 점! (Option)

  • NA

@king2dwellsang king2dwellsang added the fix # Fix bug label Aug 26, 2024
@king2dwellsang king2dwellsang added the Review Plz🙏 # Review is not yet complete label Aug 26, 2024
Copy link
Member

@Jungjjeong Jungjjeong left a comment

Choose a reason for hiding this comment

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

👍

@@ -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 시켜주는 처리도 필요할 것 같아요!

@king2dwellsang king2dwellsang added Approved 🆗 # Review is completed and removed Review Plz🙏 # Review is not yet complete labels Aug 26, 2024
@wokbjso wokbjso merged commit 5071a8f into main Aug 26, 2024
1 check passed
@wokbjso wokbjso deleted the fix/record-api-duplicate branch August 26, 2024 13:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Approved 🆗 # Review is completed fix # Fix bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants