fix: Broken Embed Dialog in Routing Forms due to recent rewrite (#10434)

Co-authored-by: zomars <[email protected]>
This commit is contained in:
Hariom Balharaandzomars authored and GitHub committed 2023-08-02 19:40:53 +00:00
1 parent ea7853789c
commit a56b19e618
8 files changed
+45 -17

No files matched your search

+4 -5
View File
@@ -547,7 +547,7 @@ const navigation: NavigationItemType[] = [
icon: Grid,
isCurrent: ({ pathname: path, item }) => {
// During Server rendering path is /v2/apps but on client it becomes /apps(weird..)
return path?.startsWith(item.href) || path?.startsWith("/v2" + item.href);
return path?.startsWith(item.href) && !path?.includes("routing-forms/");
},
child: [
{
@@ -556,8 +556,7 @@ const navigation: NavigationItemType[] = [
isCurrent: ({ pathname: path, item }) => {
// During Server rendering path is /v2/apps but on client it becomes /apps(weird..)
return (
(path?.startsWith(item.href) || path?.startsWith("/v2" + item.href)) &&
!path.includes("/installed")
path?.startsWith(item.href) && !path?.includes("routing-forms/") && !path?.includes("/installed")
);
},
},
@@ -576,9 +575,9 @@ const navigation: NavigationItemType[] = [
},
{
name: "Routing Forms",
href: "/routing-forms/forms",
href: "/apps/routing-forms/forms",
icon: FileText,
isCurrent: ({ pathname }) => pathname?.startsWith("/routing-forms/"),
isCurrent: ({ pathname }) => pathname?.startsWith("/apps/routing-forms/"),
},
{
name: "workflows",