From bc238428b67e3014fec9258d8202d31ffc591067 Mon Sep 17 00:00:00 2001 From: Joseph Izang Date: Thu, 22 Aug 2024 13:31:58 +0100 Subject: [PATCH] show worksspace creation option conditionally --- .../workspace/src/lib/remix-ui-workspace.tsx | 33 +++++++++++-------- 1 file changed, 20 insertions(+), 13 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 3673851d11..6260ce0404 100644 --- a/libs/remix-ui/workspace/src/lib/remix-ui-workspace.tsx +++ b/libs/remix-ui/workspace/src/lib/remix-ui-workspace.tsx @@ -917,6 +917,22 @@ export function Workspace() { _paq.push(['trackEvent', 'Workspace', 'GIT', 'login']) } + const CreateDropDownMenuItem = () => { + return ( + <> + { + createWorkspace() + }} + > + + {' '} + - -{' '} + + + + ) + } return (
{selectedWorkspace ? selectedWorkspace.name : currentWorkspace === LOCALHOST ? formatNameForReadonly('localhost') : NO_WORKSPACE} - - { - createWorkspace() - }} - > - { - - {' '} - - -{' '} - - } - + { + currentWorkspace !== LOCALHOST && + + } { switchWorkspace(LOCALHOST)