add open in new tab option to the footer
All checks were successful
Deploy / deploy (push) Successful in 2m21s

This commit is contained in:
Lee 2024-09-27 19:50:27 +01:00
parent ed61d8c8e6
commit 3709794d11

@ -1,9 +1,10 @@
import Link from "next/link";
import { getBuildInformation } from "@/common/website-utils"; import { getBuildInformation } from "@/common/website-utils";
import Link from "next/link";
type NavbarItem = { type NavbarItem = {
name: string; name: string;
link: string; link: string;
openInNewTab?: boolean;
}; };
const items: NavbarItem[] = [ const items: NavbarItem[] = [
@ -14,6 +15,7 @@ const items: NavbarItem[] = [
{ {
name: "Source", name: "Source",
link: "https://git.fascinated.cc/Fascinated/scoresaber-reloadedv3", link: "https://git.fascinated.cc/Fascinated/scoresaber-reloadedv3",
openInNewTab: true,
}, },
]; ];
@ -34,6 +36,7 @@ export default function Footer() {
key={index} key={index}
className="px-2 text-pp hover:brightness-75 transition-all transform-gpu" className="px-2 text-pp hover:brightness-75 transition-all transform-gpu"
href={item.link} href={item.link}
target={item.openInNewTab ? "_blank" : undefined}
> >
{item.name} {item.name}
</Link> </Link>