Skip to content

Commit bc0b8af

Browse files
authored
Merge pull request #324 from code-zero-to-one/fix/qnrr-769
fix: 그룹스터디 종료/삭제 시 라우팅 및 에러 처리 개선 (QNRR-769)
2 parents 93b7f00 + d8559d3 commit bc0b8af

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)