From 655eaf483a27e8f87a4be524a08cd298b767ea6e Mon Sep 17 00:00:00 2001 From: Marco Salazar Date: Mon, 23 Dec 2024 10:51:19 -0500 Subject: [PATCH] include workspace context change --- .../WorkspaceContext/WorkspaceContext.tsx | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/js_modules/dagster-ui/packages/ui-core/src/workspace/WorkspaceContext/WorkspaceContext.tsx b/js_modules/dagster-ui/packages/ui-core/src/workspace/WorkspaceContext/WorkspaceContext.tsx index 4870011c261eb..cd60b1e776c55 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/workspace/WorkspaceContext/WorkspaceContext.tsx +++ b/js_modules/dagster-ui/packages/ui-core/src/workspace/WorkspaceContext/WorkspaceContext.tsx @@ -62,9 +62,18 @@ interface WorkspaceState { setHidden: SetVisibleOrHiddenFn; } -export const WorkspaceContext = React.createContext( - new Error('WorkspaceContext should never be uninitialized') as any, -); +export const WorkspaceContext = React.createContext({ + allRepos: [], + visibleRepos: [], + data: {}, + refetch: () => Promise.reject(), + toggleVisible: () => {}, + loading: false, + locationEntries: [], + locationStatuses: {}, + setVisible: () => {}, + setHidden: () => {}, +}); interface BaseLocationParams { localCacheIdPrefix?: string;