diff --git a/apps/admin-x-framework/src/providers/RoutingProvider.tsx b/apps/admin-x-framework/src/providers/RoutingProvider.tsx index 46f93f2c11..f14c3a8072 100644 --- a/apps/admin-x-framework/src/providers/RoutingProvider.tsx +++ b/apps/admin-x-framework/src/providers/RoutingProvider.tsx @@ -46,7 +46,6 @@ function getHashPath(basePath: string, urlPath: string | undefined) { } const regex = new RegExp(`/${basePath}/(.*)`); const match = urlPath?.match(regex); - if (match) { const afterSettingsX = match[1]; return afterSettingsX; @@ -84,7 +83,7 @@ const handleNavigation = (basePath: string, currentRoute: string | undefined, lo }; const matchRoute = (pathname: string, routeDefinition: string) => { - const regex = new RegExp('^' + routeDefinition.replace(/:(\w+)/, '(?<$1>[^/]+)') + '$'); + const regex = new RegExp('^' + routeDefinition.replace(/:(\w+)/g, '(?<$1>[^/]+)') + '/?$'); const match = pathname.match(regex); if (match) { return match.groups || {}; diff --git a/apps/admin-x-settings/src/components/providers/SettingsRouter.tsx b/apps/admin-x-settings/src/components/providers/SettingsRouter.tsx index d5cb055bfd..c2fff273d1 100644 --- a/apps/admin-x-settings/src/components/providers/SettingsRouter.tsx +++ b/apps/admin-x-settings/src/components/providers/SettingsRouter.tsx @@ -11,6 +11,7 @@ export const modalPaths: {[key: string]: ModalName} = { 'navigation/edit': 'NavigationModal', 'staff/invite': 'InviteUserModal', 'staff/:slug': 'UserDetailModal', + 'staff/:slug/edit': 'UserDetailModal', 'portal/edit': 'PortalModal', 'tiers/add': 'TierDetailModal', 'tiers/:id': 'TierDetailModal',