From a2be46e16b8f820fae952e149cb69afe3e20527d Mon Sep 17 00:00:00 2001 From: Shijun Wang Date: Tue, 9 Sep 2025 08:33:25 +0300 Subject: [PATCH] return progress bar instead of null Signed-off-by: Shijun Wang --- plugins/home/report.api.md | 2 +- .../src/components/CustomHomepage/CustomHomepageGrid.tsx | 9 ++++++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/plugins/home/report.api.md b/plugins/home/report.api.md index 73c6d035cc..dd33b952ee 100644 --- a/plugins/home/report.api.md +++ b/plugins/home/report.api.md @@ -84,7 +84,7 @@ export const createCardExtension: typeof createCardExtension_2; // @public export const CustomHomepageGrid: ( props: CustomHomepageGridProps, -) => JSX_2.Element | null; +) => JSX_2.Element; // @public export type CustomHomepageGridProps = { diff --git a/plugins/home/src/components/CustomHomepage/CustomHomepageGrid.tsx b/plugins/home/src/components/CustomHomepage/CustomHomepageGrid.tsx index b4b674be1b..fec7895170 100644 --- a/plugins/home/src/components/CustomHomepage/CustomHomepageGrid.tsx +++ b/plugins/home/src/components/CustomHomepage/CustomHomepageGrid.tsx @@ -34,7 +34,11 @@ import { } from '@material-ui/core/styles'; import { compact } from 'lodash'; import useObservable from 'react-use/esm/useObservable'; -import { ContentHeader, ErrorBoundary } from '@backstage/core-components'; +import { + ContentHeader, + ErrorBoundary, + Progress, +} from '@backstage/core-components'; import Typography from '@material-ui/core/Typography'; import { WidgetSettingsOverlay } from './WidgetSettingsOverlay'; import { AddWidgetDialog } from './AddWidgetDialog'; @@ -325,9 +329,8 @@ export const CustomHomepageGrid = (props: CustomHomepageGridProps) => { ); }; - // Don't render anything while storage is loading if (isStorageLoading) { - return null; + return ; } return (