Skip to content

Commit d8559d3

Browse files
doyou1claude
andcommitted
fix: 그룹스터디 종료/삭제 시 라우팅 및 에러 처리 개선
- onSettled에서 onSuccess로 라우팅 이동하여 성공 시에만 페이지 전환 - 스터디 종료 시 onError 핸들러 추가 - 라우팅 경로를 /study에서 /group-study로 수정 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
1 parent b1105b5 commit d8559d3

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

src/components/pages/group-study-detail-page.tsx

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,10 +86,13 @@ export default function StudyDetailPage({
8686
group_study_id: String(groupStudyId),
8787
});
8888
alert('스터디가 종료되었습니다.');
89+
router.push('/group-study');
90+
},
91+
onError: () => {
92+
alert('스터디 종료에 실패하였습니다.');
8993
},
9094
onSettled: () => {
9195
setShowModal(false);
92-
router.push('/study');
9396
},
9497
},
9598
);
@@ -114,12 +117,12 @@ export default function StudyDetailPage({
114117
group_study_id: String(groupStudyId),
115118
});
116119
alert('스터디가 삭제되었습니다.');
120+
router.push('/group-study');
117121
},
118122
onError: () => {
119123
alert('스터디 삭제에 실패하였습니다.');
120124
},
121125
onSettled: () => {
122-
router.push('/study');
123126
setShowModal(false);
124127
},
125128
},

0 commit comments

Comments
 (0)