Skip to content

Commit

Permalink
Fix group-add-members links
Browse files Browse the repository at this point in the history
  • Loading branch information
fhlavac committed Jul 3, 2023
1 parent 00f36b0 commit 2fac9f0
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/smart-components/group/member/group-members.js
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,10 @@ const GroupMembers = () => {

const routes = () => (
<Routes>
<Route path={pathnames['group-add-members'].path} element={<AddGroupMembers fetchData={fetchData} closeUrl="../" />} />
<Route
path={pathnames['group-add-members'].path}
element={<AddGroupMembers fetchData={fetchData} closeUrl={pathnames['group-detail-members'].link.replace(':groupId', groupId)} />}
/>
</Routes>
);

Expand All @@ -113,7 +116,7 @@ const GroupMembers = () => {
const toolbarButtons = () => [
...(hasPermissions.current
? [
<AppLink to={pathnames['group-add-members'].link} key="remove-from-group" className="rbac-m-hide-on-sm">
<AppLink to={pathnames['group-add-members'].link.replace(':groupId', groupId)} key="remove-from-group" className="rbac-m-hide-on-sm">
<Button variant="primary" aria-label="Add member">
{intl.formatMessage(messages.addMember)}
</Button>
Expand Down

0 comments on commit 2fac9f0

Please sign in to comment.