diff --git a/app/components/DocumentMeta.tsx b/app/components/DocumentMeta.tsx index 9216d2b6c..f96c9be94 100644 --- a/app/components/DocumentMeta.tsx +++ b/app/components/DocumentMeta.tsx @@ -18,6 +18,7 @@ type Props = { showLastViewed?: boolean; showParentDocuments?: boolean; document: Document; + replace?: boolean; to?: LocationDescriptor; }; @@ -28,6 +29,7 @@ const DocumentMeta: React.FC = ({ showParentDocuments, document, children, + replace, to, ...rest }) => { @@ -145,7 +147,13 @@ const DocumentMeta: React.FC = ({ return ( - {to ? {content} : content} + {to ? ( + + {content} + + ) : ( + content + )} {showCollection && collection && (  {t("in")}  diff --git a/app/components/DocumentMetaWithViews.tsx b/app/components/DocumentMetaWithViews.tsx index 8c23bd334..08e1e8309 100644 --- a/app/components/DocumentMetaWithViews.tsx +++ b/app/components/DocumentMetaWithViews.tsx @@ -31,7 +31,7 @@ function DocumentMetaWithViews({ to, isDraft, document, ...rest }: Props) { }); return ( - + {totalViewers && !isDraft ? ( {(props) => (