From 9b444d86dd249caefdc33e44a70bc0b17b17d494 Mon Sep 17 00:00:00 2001 From: Florian Dieminger Date: Fri, 12 Mar 2021 15:10:49 +0100 Subject: [PATCH] hide toolbar for frozen locales (#3213) --- client/src/document/index.tsx | 4 ++-- client/src/document/types.tsx | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/client/src/document/index.tsx b/client/src/document/index.tsx index 20c74126c96f..cc955807cc7c 100644 --- a/client/src/document/index.tsx +++ b/client/src/document/index.tsx @@ -145,7 +145,7 @@ export function Document(props /* TODO: define a TS interface for this */) { <> {doc.isArchive && !doc.isTranslated && } - {/* if we have either breadcrumbs or translations for the current page, + {/* if we have either breadcrumbs or translations for the current page, continue rendering the section */} {(doc.parents || !!translations.length) && (
@@ -159,7 +159,7 @@ export function Document(props /* TODO: define a TS interface for this */) { {doc.toc && !!doc.toc.length && } - {!isServer && CRUD_MODE && !props.isPreview && !doc.isArchive && ( + {!isServer && CRUD_MODE && !props.isPreview && doc.isActive && ( Loading toolbar

} > diff --git a/client/src/document/types.tsx b/client/src/document/types.tsx index c9bc40dd3495..930399f823c3 100644 --- a/client/src/document/types.tsx +++ b/client/src/document/types.tsx @@ -126,4 +126,5 @@ export interface Doc { contributors: string[]; isArchive: boolean; isTranslated: boolean; + isActive: boolean; }