From 6b0bfc18455c64e99afc84e78661fc83da796511 Mon Sep 17 00:00:00 2001 From: chinnamatli kusumalatha Date: Fri, 20 Dec 2024 20:38:17 +0530 Subject: [PATCH] fixing folder missing issue when user upload pdf from editor and came back to home page --- packages/online-editor/src/home/HomePage.tsx | 112 ++++++++++--------- 1 file changed, 57 insertions(+), 55 deletions(-) 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}"`} - - - - - - - - } - /> - - - - )) || ( + + + + )) || (