diff --git a/.changeset/selfish-ravens-drop.md b/.changeset/selfish-ravens-drop.md new file mode 100644 index 0000000000..1b7585c063 --- /dev/null +++ b/.changeset/selfish-ravens-drop.md @@ -0,0 +1,5 @@ +--- +"gitbook": patch +--- + +Expose "Best match" when site has translations diff --git a/packages/gitbook/src/components/Header/Header.tsx b/packages/gitbook/src/components/Header/Header.tsx index b952f5d598..257a00792a 100644 --- a/packages/gitbook/src/components/Header/Header.tsx +++ b/packages/gitbook/src/components/Header/Header.tsx @@ -124,10 +124,7 @@ export function Header(props: { withSiteVariants={ sections?.list.some( (s) => - s.object === 'site-section' && - s.siteSpaces.filter( - (s) => s.space.language === siteSpace.space.language - ).length > 1 + s.object === 'site-section' && s.siteSpaces.length > 1 ) ?? false } withSections={!!sections} diff --git a/packages/gitbook/src/components/SpaceLayout/SpaceLayout.tsx b/packages/gitbook/src/components/SpaceLayout/SpaceLayout.tsx index a9be339da8..d813b35946 100644 --- a/packages/gitbook/src/components/SpaceLayout/SpaceLayout.tsx +++ b/packages/gitbook/src/components/SpaceLayout/SpaceLayout.tsx @@ -185,11 +185,7 @@ export function SpaceLayout(props: SpaceLayoutProps) { sections?.list.some( (s) => s.object === 'site-section' && - s.siteSpaces.filter( - (s) => - s.space.language === - siteSpace.space.language - ).length > 1 + s.siteSpaces.length > 1 ) ?? false } withSections={withSections}