diff --git a/website/src/pages/versions.js b/website/src/pages/versions.js index 27531b958a..801c618654 100644 --- a/website/src/pages/versions.js +++ b/website/src/pages/versions.js @@ -19,6 +19,7 @@ function Version() { const context = useDocusaurusContext(); const {siteConfig = {}} = context; const latestVersion = versions[0]; + const pastVersions = versions.filter(version => version !== latestVersion); const repoUrl = `https://github.com/${siteConfig.organizationName}/${siteConfig.projectName}`; return ( -
-

Past Versions

-

- Here you can find documentation for previous versions of Docusaurus. -

- - - {versions.map( - version => - version !== latestVersion && ( - - - - - - ), - )} - -
{version} - - Documentation - - - - Release Notes - -
-
+ {pastVersions.length > 0 && ( +
+

Past Versions

+

+ Here you can find documentation for previous versions of + Docusaurus. +

+ + + {pastVersions.map(version => ( + + + + + + ))} + +
{version} + + Documentation + + + + Release Notes + +
+
+ )}
);