Skip to content

Commit

Permalink
Merge pull request #47 from catenax-eV/feat/adapt-naming-for-next
Browse files Browse the repository at this point in the history
feat(chore): Add Version functionality
  • Loading branch information
stephanbcbauer authored Jun 20, 2024
2 parents a64ff8d + 74ecb9a commit 6edb8a3
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions src/theme/NavbarItem/DocsVersionDropdownNavbarItem.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import React from "react";
import DocsVersionDropdownNavbarItem from '@theme-original/NavbarItem/DocsVersionDropdownNavbarItem';
import { useLocation } from '@docusaurus/router';

export default function DocsVersionDropdownNavbarItemWrapper(props) {
const { docsPluginId, className, type } = props
const { pathname } = useLocation()

const doesPathnameContainDocsPluginId = pathname.includes("/docs/")
if (!doesPathnameContainDocsPluginId) {
return null
}
return <DocsVersionDropdownNavbarItem {...props} />;
}

0 comments on commit 6edb8a3

Please sign in to comment.