diff --git a/Client/src/components/layout/dynamicLayouts/MobileHeader.tsx b/Client/src/components/layout/dynamicLayouts/MobileHeader.tsx index 60693ea7..9e24783a 100644 --- a/Client/src/components/layout/dynamicLayouts/MobileHeader.tsx +++ b/Client/src/components/layout/dynamicLayouts/MobileHeader.tsx @@ -76,11 +76,8 @@ function MobileHeader() { }; const isActive = (path: string) => { - if (path === "/flowchart" && userData.flowchartInformation.flowchartId) { - return ( - location.pathname === - `/flowchart/${userData.flowchartInformation.flowchartId}` - ); + if (path === "/flowchart") { + return location.pathname.startsWith("/flowchart/"); } else if (path === "/chat" && currentChatId) { return location.pathname === `/chat/${currentChatId}`; } else if (path === "/schedule-builder" && currentSchedule) { diff --git a/Client/src/components/layout/dynamicLayouts/OuterIconSidebar.tsx b/Client/src/components/layout/dynamicLayouts/OuterIconSidebar.tsx index 5c540c06..283babd6 100644 --- a/Client/src/components/layout/dynamicLayouts/OuterIconSidebar.tsx +++ b/Client/src/components/layout/dynamicLayouts/OuterIconSidebar.tsx @@ -105,11 +105,8 @@ function OuterIconSidebar() { }; const isActive = (path: string) => { - if (path === "/flowchart" && userData.flowchartInformation.flowchartId) { - return ( - location.pathname === - `/flowchart/${userData.flowchartInformation.flowchartId}` - ); + if (path === "/flowchart") { + return location.pathname.startsWith("/flowchart/"); } else if (path === "/chat" && currentChatId) { return location.pathname === `/chat/${currentChatId}`; } else if (