From fac86a2a28f67174b2277f33646db4a955d152bb Mon Sep 17 00:00:00 2001 From: Tom Moor Date: Fri, 28 Jan 2022 21:59:29 -0800 Subject: [PATCH] fix: Don't show share button on trashed docs closes #2999 --- app/scenes/Document/components/Header.tsx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/scenes/Document/components/Header.tsx b/app/scenes/Document/components/Header.tsx index 6a310cc38..f401126b0 100644 --- a/app/scenes/Document/components/Header.tsx +++ b/app/scenes/Document/components/Header.tsx @@ -96,7 +96,7 @@ function DocumentHeader({ }); }, [onSave]); - const isTemplate = document.isTemplate; + const { isDeleted, isTemplate } = document; const can = policies.abilities(document.id); const canToggleEmbeds = team?.documentEmbeds; const canEdit = can.update && !isEditing; @@ -208,7 +208,7 @@ function DocumentHeader({ {!isPublishing && isSaving && !team?.collaborativeEditing && ( {t("Saving")}… )} - + {!isDeleted && } {(isEditing || team?.collaborativeEditing) && !isTemplate && isNew && ( )} - {!isEditing && (!isMobile || !isTemplate) && ( + {!isEditing && !isDeleted && (!isMobile || !isTemplate) && ( @@ -295,7 +295,7 @@ function DocumentHeader({ )} {!isEditing && ( <> - + {!isDeleted && }