Skip to content

Commit

Permalink
fix: avoid applying beta tags to nav items for next components (patte…
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolethoen committed Mar 28, 2024
1 parent 732095c commit d613112
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down
2 changes: 1 addition & 1 deletion packages/documentation-framework/templates/mdx.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) => {
Expand Down

0 comments on commit d613112

Please sign in to comment.