diff --git a/src/templates/MainLayout/MainLayout.tsx b/src/templates/MainLayout/MainLayout.tsx index ec96087..e89ff53 100644 --- a/src/templates/MainLayout/MainLayout.tsx +++ b/src/templates/MainLayout/MainLayout.tsx @@ -66,13 +66,17 @@ export const MainLayout: FC = ({ children, forcedTheme }) => { } }, [clusterListQuery, dispatch]) - if (clusterName) { - dispatch(setCluster(clusterName)) - } + // if (clusterName) { + // dispatch(setCluster(clusterName)) + // } - if (clusterName === undefined) { - dispatch(setCluster('')) - } + // if (clusterName === undefined) { + // dispatch(setCluster('')) + // } + + useEffect(() => { + dispatch(setCluster(clusterName ?? '')) + }, [dispatch, clusterName]) return (