Skip to content

Commit 5e872a5

Browse files
committed
Close group modal when redirecting to set assignments using the button
1 parent 934c3e0 commit 5e872a5

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/app/components/elements/GroupsModalCreators.tsx

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import React, {useState} from "react";
22
import {connect, ResolveThunks} from "react-redux";
3-
import {Link} from "react-router-dom";
43
import {sortBy} from "lodash";
4+
import {history} from "../../services/history";
55
import * as RS from "reactstrap";
66

77
import {RegisteredUserDTO, UserSummaryWithEmailAddressDTO} from "../../../IsaacApiTypes";
@@ -65,7 +65,10 @@ export const groupInvitationModal = (firstTime: boolean) => {
6565
</RS.Button>
6666
</RS.Col>
6767
<RS.Col>
68-
<RS.Button block key={0} color="secondary" tag={Link} to="/set_assignments">
68+
<RS.Button block key={0} color="secondary" onClick={() => {
69+
store.dispatch(closeActiveModal());
70+
history.push("/set_assignments");
71+
}}>
6972
Set an assignment
7073
</RS.Button>
7174
</RS.Col>

0 commit comments

Comments
 (0)