Skip to content

Commit 4c4d3b5

Browse files
committed
Enforcing page reload when user locks himself in a group.
1 parent e31a49d commit 4c4d3b5

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/containers/ExamLockButtonContainer/ExamLockButtonContainer.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,12 @@ const mapStateToProps = (state, { groupId }) => ({
5858
});
5959

6060
const mapDispatchToProps = (dispatch, { groupId }) => ({
61-
lockStudentForExam: userId => dispatch(lockStudentForExam(groupId, userId)),
61+
lockStudentForExam: userId =>
62+
dispatch(lockStudentForExam(groupId, userId)).then(() => {
63+
if (window) {
64+
window.location.reload();
65+
}
66+
}),
6267
addNotification: (...args) => dispatch(addNotification(...args)),
6368
});
6469

0 commit comments

Comments
 (0)