diff --git a/packages/online-editor/src/home/HomePage.tsx b/packages/online-editor/src/home/HomePage.tsx index b0a7f639172..55004e5f74e 100644 --- a/packages/online-editor/src/home/HomePage.tsx +++ b/packages/online-editor/src/home/HomePage.tsx @@ -320,62 +320,64 @@ export function WorkspaceCard(props: { rejected={() => <>ERROR} resolved={(workspace) => ( <> - {(editableFiles.length === 1 && workspace.descriptor.origin.kind === WorkspaceKind.LOCAL && ( - setHovered(true)} - onMouseLeave={() => setHovered(false)} - isHoverable={true} - isCompact={true} - style={{ cursor: "pointer" }} - onClick={() => { - history.push({ - pathname: routes.workspaceWithFilePath.path({ - workspaceId: editableFiles[0].workspaceId, - fileRelativePath: editableFiles[0].relativePathWithoutExtension, - extension: editableFiles[0].extension, - }), - }); - }} - > - - - - setHovered(true)} + onMouseLeave={() => setHovered(false)} + isHoverable={true} + isCompact={true} + style={{ cursor: "pointer" }} + onClick={() => { + history.push({ + pathname: routes.workspaceWithFilePath.path({ + workspaceId: editableFiles[0].workspaceId, + fileRelativePath: editableFiles[0].relativePathWithoutExtension, + extension: editableFiles[0].extension, + }), + }); + }} + > + + + + + + + e.stopPropagation()} // Prevent bug when clicking at the backdrop of ResponsiveDropdown + > + { + props.onDelete?.(); + workspaces.deleteWorkspace({ workspaceId: props.workspaceId }); + }} + item={ + + + Delete {`"${editableFiles[0].nameWithoutExtension}"`} + + + + + + + + } /> - - - e.stopPropagation()} // Prevent bug when clicking at the backdrop of ResponsiveDropdown - > - { - props.onDelete?.(); - workspaces.deleteWorkspace({ workspaceId: props.workspaceId }); - }} - item={ - - - Delete {`"${editableFiles[0].nameWithoutExtension}"`} - - - - - - - - } - /> - - - - )) || ( + + + + )) || (