diff --git a/web-app/src/routes/__root.tsx b/web-app/src/routes/__root.tsx index ca287872b..cfa05df16 100644 --- a/web-app/src/routes/__root.tsx +++ b/web-app/src/routes/__root.tsx @@ -192,17 +192,16 @@ const LogsLayout = () => { } function RootLayout() { - const pathname = useRouterState({ - select: (state) => state.location.pathname, - }) - const isLocalAPIServerLogsRoute = useMemo( - () => + const getInitialLayoutType = () => { + const pathname = window.location.pathname + return ( pathname === route.localApiServerlogs || pathname === route.systemMonitor || - pathname === route.appLogs, - [pathname] - ) + pathname === route.appLogs + ) + } + const IS_LOGS_ROUTE = getInitialLayoutType() return ( @@ -214,7 +213,7 @@ function RootLayout() { - {isLocalAPIServerLogsRoute ? : } + {IS_LOGS_ROUTE ? : } {/* {isLocalAPIServerLogsRoute ? : } */}