diff --git a/public/app/features/dashboard/containers/DashboardSelect.tsx b/public/app/features/dashboard/containers/DashboardSelect.tsx index 312be3ae..f7e9ab1d 100644 --- a/public/app/features/dashboard/containers/DashboardSelect.tsx +++ b/public/app/features/dashboard/containers/DashboardSelect.tsx @@ -61,7 +61,7 @@ const DashboardSelect = () => { className={cx(gitHubButtonStyles.button, gitHubButtonStyles.basicButton, styles.button)} aria-label="New" > -
{currDashboard}
+
{backendState.isValid ? currDashboard : ''}
diff --git a/public/app/features/dashboard/containers/OptionSelect.tsx b/public/app/features/dashboard/containers/OptionSelect.tsx index 8dfe9635..06aa99c5 100644 --- a/public/app/features/dashboard/containers/OptionSelect.tsx +++ b/public/app/features/dashboard/containers/OptionSelect.tsx @@ -19,7 +19,8 @@ interface Props { } const OptionSelect = ({ picker }: Props) => { - const dashboards = useSelector((state) => state.fourtyTwoClusterBackend).dashboards; + const backendState = useSelector((state) => state.fourtyTwoClusterBackend); + const dashboards = backendState.dashboards; const [isOpen, setIsOpen] = useState(false); const gitHubButtonStyles = useStyles2(GitHubButtonStyles); const styles = useStyles2(getStyles); @@ -77,7 +78,7 @@ const OptionSelect = ({ picker }: Props) => { className={cx(gitHubButtonStyles.button, gitHubButtonStyles.greenButton)} aria-label="New" > -
{currSubCategory}
+
{backendState.isValid ? currSubCategory : ''}
);