Skip to content

Conversation

@yeonddori
Copy link
Collaborator

관련 이슈

작업 요약

  • 팀장은 회원 탈퇴가 불가능하도록 구현

작업 상세 설명

  • 팀장일 시 팀 이름과 함께 탈퇴 불가능한 사유 에러 문구로 띄우기

미리 보기

image

@yeonddori yeonddori requested a review from Copilot May 28, 2025 14:09
@yeonddori yeonddori self-assigned this May 28, 2025
@yeonddori yeonddori added the ✨ 기능 개발 새로운 기능을 구현하는 데 필요한 작업 또는 변경 사항 label May 28, 2025
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR prevents a team leader from deleting their account by showing an error alert when the deletion request fails.

  • Added response check on deleteUserInfo to show a failure alert and close the modal if res.ok is false.
  • Preserves existing success flow: reset user state, refetch sidebar, and close modal.


const handleDeleteUserButtonClick = () => {
deleteUserInfo().then(() => {
deleteUserInfo().then((res) => {
Copy link

Copilot AI May 28, 2025

Choose a reason for hiding this comment

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

Add a .catch() handler after .then() to handle network or unexpected errors from deleteUserInfo, otherwise promise rejections will be unhandled.

Copilot uses AI. Check for mistakes.
deleteUserInfo().then(() => {
deleteUserInfo().then((res) => {
if (!res.ok) {
alert(res.body.message || '회원 탈퇴에 실패했습니다.');
Copy link

Copilot AI May 28, 2025

Choose a reason for hiding this comment

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

[nitpick] Extract the hardcoded error message into a constant or localization bundle to keep translations and strings centralized.

Copilot uses AI. Check for mistakes.
@yeonddori yeonddori merged commit d34d412 into develop May 28, 2025
1 check passed
@yeonddori yeonddori deleted the Feature/#458-팀장은_회원_탈퇴가_불가능하도록_구현 branch May 28, 2025 14:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

✨ 기능 개발 새로운 기능을 구현하는 데 필요한 작업 또는 변경 사항

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEAT] 팀장은 회원 탈퇴가 불가능하도록 구현

2 participants