Skip to content

Commit

Permalink
Navigates to roles page instead of '/' on "Go back to Roles"
Browse files Browse the repository at this point in the history
  • Loading branch information
cedricwaxwing committed Apr 20, 2022
1 parent 1cc8bc6 commit d3d9046
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions packages/app/src/components/views/Role/RoleNoTarget.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Box, makeStyles, Typography } from "@material-ui/core"
import { Link as RouterLink } from "react-router-dom"
import { Link as RouterLink, useParams } from "react-router-dom"
import ButtonLink from "../../commons/input/ButtonLink"
import { ArrowBackSharp } from "@material-ui/icons"

Expand All @@ -14,6 +14,7 @@ const useStyles = makeStyles(() => ({

export const RoleNoTarget = () => {
const classes = useStyles()
const { module } = useParams()
return (
<Box className={classes.mainPanelZeroState}>
<Box sx={{ display: "flex", alignItems: "center", flexDirection: "column" }}>
Expand All @@ -23,7 +24,7 @@ export const RoleNoTarget = () => {
Once you’ve added a target, you can configure the permissions here.
</Typography>
<Box sx={{ mt: 2 }}>
<RouterLink to="/">
<RouterLink to={`/${module}`}>
<ButtonLink icon={<ArrowBackSharp fontSize="small" />} text="Go back to Roles" />
</RouterLink>
</Box>
Expand Down

0 comments on commit d3d9046

Please sign in to comment.