Skip to content

Commit 8564125

Browse files
committed
그룹 생성 후 창 close & 자동 새로고침
1 parent 59d3021 commit 8564125

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

polling-app-client/src/components/Dashboard/GroupCreateModal.jsx

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,14 +27,18 @@ class GroupCreateModal extends Component {
2727
throw new Error("응답에 그룹 이름이 없습니다.");
2828
}
2929
message.success(`그룹 "${data.name}" 생성 완료`);
30-
try {
31-
this.props.onCreated();
30+
31+
if (this.props.onClose) {
3232
this.props.onClose();
33-
} catch (e) {
34-
console.error("후처리 중 오류:", e);
3533
}
3634

37-
})
35+
setTimeout(() => {
36+
window.location.reload();
37+
}, 500);
38+
})
39+
40+
41+
3842
.catch(() => {
3943
message.error('그룹 생성에 실패했습니다.');
4044
});

0 commit comments

Comments
 (0)