From 5b080f4e03140bb60c26e158135647710a34546f Mon Sep 17 00:00:00 2001 From: Marco Salazar Date: Thu, 13 Jun 2024 12:50:41 -0400 Subject: [PATCH] stop showing spinner --- .../packages/ui-core/src/nav/useCodeLocationsStatus.tsx | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/js_modules/dagster-ui/packages/ui-core/src/nav/useCodeLocationsStatus.tsx b/js_modules/dagster-ui/packages/ui-core/src/nav/useCodeLocationsStatus.tsx index 5de068c3e9496..98e523672ea8d 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/nav/useCodeLocationsStatus.tsx +++ b/js_modules/dagster-ui/packages/ui-core/src/nav/useCodeLocationsStatus.tsx @@ -61,6 +61,15 @@ export const useCodeLocationsStatus = (): StatusAndMessage | null => { icon: 'check_circle', }); } + + const anyLoading = Object.values(data).some( + (entry) => + entry.__typename === 'WorkspaceLocationEntry' && + entry.loadStatus === RepositoryLocationLoadStatus.LOADING, + ); + if (!anyLoading) { + setShowSpinner(false); + } // eslint-disable-next-line react-hooks/exhaustive-deps }, [data, onClickViewButton]);