Skip to content

Commit bd43cfe

Browse files
committed
feat: add logic to control translation status display
1 parent f9b69e1 commit bd43cfe

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

website/src/components/templates/BaseTemplate.tsx

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
import { html } from "hono/html";
22
import type { FC, PropsWithChildren } from "hono/jsx";
3-
import { basePath, originUrl, typstOfficialDocsUrl } from "../../metadata";
3+
import {
4+
basePath,
5+
displayTranslationStatus,
6+
originUrl,
7+
typstOfficialDocsUrl,
8+
} from "../../metadata";
49
import { Translation, translation } from "../../translation/";
510
import type { Page } from "../../types/model";
611
import { joinPath, shiftBase } from "../../utils/path";
@@ -208,7 +213,10 @@ export const BaseTemplate: FC<BaseTemplateProps> = ({
208213
<Breadcrumbs path={path} />
209214

210215
<div class="flex flex-col gap-2 my-4">
211-
<TranslationStatusAlert status={translationStatus} />
216+
{(displayTranslationStatus ||
217+
translationStatus === "community") && (
218+
<TranslationStatusAlert status={translationStatus} />
219+
)}
212220
</div>
213221

214222
{translationStatus !== "community" && (

0 commit comments

Comments
 (0)