feat: Use new /routing URL for routing forms (#19235)
* feat: Use new /routing URL for routing forms * Fixes * Fix bug * precent crash --------- Co-authored-by: Hariom Balhara <[email protected]>
This commit is contained in:
1 parent
6364e85293
commit
f6f964d495
14 files changed
+376
-129
No files matched your search
@@ -90,11 +90,11 @@ const getNavigationItems = (orgBranding: OrganizationBranding): NavigationItemTy
|
||||
},
|
||||
{
|
||||
name: "routing",
|
||||
href: "/apps/routing-forms/forms",
|
||||
href: "/routing",
|
||||
icon: "split",
|
||||
badge: <Badge variant="green">NEW</Badge>,
|
||||
|
||||
isCurrent: ({ pathname }) => pathname?.startsWith("/apps/routing-forms/") ?? false,
|
||||
isCurrent: ({ pathname }) => pathname?.startsWith("/routing") ?? false,
|
||||
moreOnMobile: true,
|
||||
},
|
||||
{
|
||||
|
||||
@@ -57,6 +57,13 @@ export const NavigationItem: React.FC<{
|
||||
<Link
|
||||
data-test-id={item.name}
|
||||
href={item.href}
|
||||
onClick={(e) => {
|
||||
// Prevents weird crash when navigating from /routing to /routing/forms
|
||||
if (item.href.startsWith("/routing")) {
|
||||
e.preventDefault();
|
||||
window.location.href = item.href;
|
||||
}
|
||||
}}
|
||||
aria-label={t(item.name)}
|
||||
target={item.target}
|
||||
className={classNames(
|
||||
|
||||
Reference in new issue
Block a user