Skip to content

Commit d791f6b

Browse files
vdusekclaude
andcommitted
fix(website): remove stale JS SDK version links from navbar dropdown
Remove hardcoded version links (1.3, 2.2) pointing to sdk.apify.com and the duplicate version dropdown logic, keeping only the one from docusaurus.config.js. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 93184c8 commit d791f6b

File tree

1 file changed

+1
-24
lines changed
  • website/src/theme/Navbar/Content

1 file changed

+1
-24
lines changed

website/src/theme/Navbar/Content/index.js

Lines changed: 1 addition & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import Link from '@docusaurus/Link';
2-
import { useLocation } from '@docusaurus/router';
32
import { useThemeConfig } from '@docusaurus/theme-common';
43
import {
54
splitNavbarItems,
@@ -38,32 +37,10 @@ function NavbarContentLayout({ left, right }) {
3837
);
3938
}
4039

41-
const VERSIONS_ITEM = {
42-
type: 'docsVersionDropdown',
43-
position: 'left',
44-
label: 'Versions',
45-
dropdownItemsAfter: [
46-
{
47-
href: 'https://sdk.apify.com/docs/guides/getting-started',
48-
label: '2.2',
49-
},
50-
{
51-
href: 'https://sdk.apify.com/docs/1.3.1/guides/getting-started',
52-
label: '1.3',
53-
},
54-
],
55-
dropdownItemsBefore: [],
56-
};
57-
5840
export default function NavbarContent() {
59-
const location = useLocation();
6041
const mobileSidebar = useNavbarMobileSidebar();
6142
const items = useNavbarItems();
62-
const effectiveItems = location.pathname?.endsWith('/python/')
63-
|| location.pathname?.endsWith('/python')
64-
? items
65-
: [...items, VERSIONS_ITEM];
66-
const [leftItems, rightItems] = splitNavbarItems(effectiveItems);
43+
const [leftItems, rightItems] = splitNavbarItems(items);
6744
const searchBarItem = items.find((item) => item.type === 'search');
6845
return (
6946
<NavbarContentLayout

0 commit comments

Comments
 (0)