diff --git a/docs/src/modules/components/AppNavDrawer.js b/docs/src/modules/components/AppNavDrawer.js index 37a3f7857ae5f6..9b5c301ac037f5 100644 --- a/docs/src/modules/components/AppNavDrawer.js +++ b/docs/src/modules/components/AppNavDrawer.js @@ -300,6 +300,8 @@ export default function AppNavDrawer(props) { if (!versions?.length) { return null; } + + const currentVersion = versions.find((version) => version.current) || versions[0]; return ( @@ -464,7 +487,28 @@ export default function AppNavDrawer(props) { metadata="MUI X" versionSelector={renderVersionSelector([ // DATE_PICKERS_VERSION is set from the X repo - { text: `v${process.env.DATE_PICKERS_VERSION}`, current: true }, + { + ...(process.env.DATE_PICKERS_VERSION.startsWith('6') + ? { + text: `v${process.env.DATE_PICKERS_VERSION}`, + current: true, + } + : { + text: `v6-alpha`, + href: `https://next.mui.com${languagePrefix}/components/data-grid/`, + }), + }, + { + ...(process.env.DATE_PICKERS_VERSION.startsWith('5') + ? { + text: `v${process.env.DATE_PICKERS_VERSION}`, + current: true, + } + : { + text: `v5`, + href: `https://mui.com${languagePrefix}/components/data-grid/`, + }), + }, ])} /> )}