From 2a7782fbae1e14253f094903476d9ba375a5e701 Mon Sep 17 00:00:00 2001 From: mfrances Date: Tue, 23 Mar 2021 17:24:57 -0400 Subject: [PATCH] fix url and rm hack --- src/user-federation/ldap/mappers/LdapMapperList.tsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/user-federation/ldap/mappers/LdapMapperList.tsx b/src/user-federation/ldap/mappers/LdapMapperList.tsx index 33de6509cd..87702e6498 100644 --- a/src/user-federation/ldap/mappers/LdapMapperList.tsx +++ b/src/user-federation/ldap/mappers/LdapMapperList.tsx @@ -27,7 +27,7 @@ import { asyncStateFetch, } from "../../../context/auth/AdminClient"; -import { useParams, Link } from "react-router-dom"; +import { Link, useParams, useRouteMatch } from "react-router-dom"; interface ComponentMapperRepresentation { config?: Record; @@ -50,6 +50,8 @@ export const LdapMapperList = () => { const adminClient = useAdminClient(); const { addAlert } = useAlerts(); + const { url } = useRouteMatch(); + // const [mapperAction, setMapperAction] = useState(false); const handleError = useErrorHandler(); @@ -101,7 +103,6 @@ export const LdapMapperList = () => { // .sort((a, b) => a.priority - b.priority) ); - const url = "mappers"; const MapperLink = (mapper: ComponentMapperRepresentation) => ( <> {mapper.name}