docs: make current docs version message dynamic

This commit is contained in:
Daniel Lautzenheiser 2024-02-08 10:55:16 -05:00
parent c2982e23d9
commit 9379d3c43e

View File

@ -145,8 +145,14 @@ const Releases = ({ docsGroups, searchablePages }: DocsMenuProps) => {
<strong>Note</strong>
</AlertTitle>
<Typography variant="subtitle1" component="div" color="inherit">
<span>The current docs are for Static CMS v3. For Static CMS v2, see&nbsp;</span>
<StyledLink href="https://v2.staticcms.org">https://v2.staticcms.org</StyledLink>.
<span>
The current docs are for Static CMS v{latestMajorVersionNumber}. For Static CMS v
{latestMajorVersionNumber - 1}, see&nbsp;
</span>
<StyledLink href={`https://v${latestMajorVersionNumber - 1}.staticcms.org`}>
https://v{latestMajorVersionNumber - 1}.staticcms.org
</StyledLink>
.
</Typography>
</Alert>
</Container>