From 0aabcb8d223daab213a86779473c8c72fe8d5e0b Mon Sep 17 00:00:00 2001 From: Tom Moor Date: Mon, 3 Jul 2023 12:16:04 -0400 Subject: [PATCH] Remove unused isOnlyTitle --- app/models/Document.ts | 5 ----- app/scenes/Document/components/Document.tsx | 10 ++++------ 2 files changed, 4 insertions(+), 11 deletions(-) diff --git a/app/models/Document.ts b/app/models/Document.ts index 3745ec01b..af1d9814f 100644 --- a/app/models/Document.ts +++ b/app/models/Document.ts @@ -122,11 +122,6 @@ export default class Document extends ParanoidModel { return this.template ? "template" : "document"; } - @computed - get isOnlyTitle(): boolean { - return !this.text.trim(); - } - @computed get modifiedSinceViewed(): boolean { return !!this.lastViewedAt && this.lastViewedAt < this.updatedAt; diff --git a/app/scenes/Document/components/Document.tsx b/app/scenes/Document/components/Document.tsx index fab2ef8ad..636a11506 100644 --- a/app/scenes/Document/components/Document.tsx +++ b/app/scenes/Document/components/Document.tsx @@ -517,7 +517,7 @@ class DocumentScene extends React.Component { canComment={abilities.comment} > {shareId && ( - + { {!isShare && !revision && ( <> - + @@ -580,8 +578,8 @@ const Background = styled(Container)` transition: ${s("backgroundTransition")}; `; -const ReferencesWrapper = styled.div<{ isOnlyTitle?: boolean }>` - margin-top: ${(props) => (props.isOnlyTitle ? -45 : 16)}px; +const ReferencesWrapper = styled.div` + margin-top: 16px; @media print { display: none;