website: fix broken links in NewsBar

Signed-off-by: Jens Langhammer <jens@goauthentik.io>
This commit is contained in:
Jens Langhammer 2023-08-02 11:17:09 +02:00
parent 198e6b0d2e
commit f38fdfff6e
No known key found for this signature in database
1 changed files with 3 additions and 2 deletions

View File

@ -19,9 +19,10 @@ export function getReleases(): ItemLink[] {
); );
const releaseVersion: ItemLink[] = releaseItems.map((relUrl: string) => { const releaseVersion: ItemLink[] = releaseItems.map((relUrl: string) => {
const [_, year, version] = relUrl.split("/"); const [_, year, version] = relUrl.split("/");
const url = useBaseUrl(`docs/releases/${version.replace("v", "")}`);
return { return {
label: `authentik ${version} released!`, label: `authentik ${version} released!`,
link: relUrl, link: url,
}; };
}); });
return releaseVersion; return releaseVersion;
@ -34,7 +35,7 @@ export function NewsBar() {
<div className="items"> <div className="items">
{getReleases().map((version) => { {getReleases().map((version) => {
return ( return (
<a key={version.link} href={useBaseUrl(version.link)}> <a key={version.link} href={version.link}>
{version.label} {version.label}
</a> </a>
); );