From 8ddf757e012449e5f92038b0a590a6aec39655f0 Mon Sep 17 00:00:00 2001 From: Joseph Izang Date: Tue, 1 Nov 2022 11:18:47 +0100 Subject: [PATCH] fix duplicate connect to localhost in workspaces dropdown --- libs/remix-ui/workspace/src/lib/remix-ui-workspace.tsx | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/libs/remix-ui/workspace/src/lib/remix-ui-workspace.tsx b/libs/remix-ui/workspace/src/lib/remix-ui-workspace.tsx index d03482f32c..f9c68d682e 100644 --- a/libs/remix-ui/workspace/src/lib/remix-ui-workspace.tsx +++ b/libs/remix-ui/workspace/src/lib/remix-ui-workspace.tsx @@ -535,6 +535,10 @@ export function Workspace () { , ] +const workspaces = global.fs.browser.workspaces +const fs = global.fs +console.log({workspaces}) +console.log({fs}) return (
@@ -629,8 +633,7 @@ export function Workspace () { } )) - } - { switchWorkspace(LOCALHOST) }}>{currentWorkspace === LOCALHOST ? ✓ localhost : { LOCALHOST } } + } { ((global.fs.browser.workspaces.length <= 0) || currentWorkspace === NO_WORKSPACE) && { switchWorkspace(NO_WORKSPACE) }}>{ NO_WORKSPACE } }