From 84442ef154f1b2414a758695af4c4e8014f26725 Mon Sep 17 00:00:00 2001 From: nicolethoen Date: Thu, 18 Jan 2024 16:54:44 -0500 Subject: [PATCH] fix: avoid applying beta tags to nav items for next components --- packages/documentation-framework/components/sideNav/sideNav.js | 2 +- packages/documentation-framework/templates/mdx.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/documentation-framework/components/sideNav/sideNav.js b/packages/documentation-framework/components/sideNav/sideNav.js index 5a78901b43..9c45ea9d8c 100644 --- a/packages/documentation-framework/components/sideNav/sideNav.js +++ b/packages/documentation-framework/components/sideNav/sideNav.js @@ -96,7 +96,7 @@ const ExpandableNav = ({groupedRoutes, location, section, subsection = null}) => source.source === "react-deprecated" || source.source === "html-deprecated") && !navObj.sources.some(source => source.source === "react" || source.source === "html") ), - isBeta: navObj.sources.some(source => source.beta), + isBeta: navObj.sources.some(source => source.beta && source.source !== 'react-next'), isDemo: navObj.sources.some(source => ( source.source === "react-demos" || source.source === "html-demos") && !navObj.sources.some(source => source.source === "react" || source.source === "html") diff --git a/packages/documentation-framework/templates/mdx.js b/packages/documentation-framework/templates/mdx.js index f3732b9f37..c40f543407 100644 --- a/packages/documentation-framework/templates/mdx.js +++ b/packages/documentation-framework/templates/mdx.js @@ -152,7 +152,7 @@ export const MDXTemplate = ({ componentsData }) => { const isDeprecated = sources.some(source => source.source === "react-deprecated" || source.source === "html-deprecated") && !sources.some(source => source.source === "react" || source.source === "html"); - const isBeta = sources.some(source => source.beta) + const isBeta = sources.some(source => source.beta && source.source !== 'react-next') const isDemo = sources.some(source => source.source === "react-demos" || source.source === "html-demos") && !sources.some(source => source.source === "react" || source.source === "html"); // Build obj mapping source names to text displayed on tabs const tabNames = sources.reduce((acc, curSrc) => {