fix: use Link instead of a elements for optimization (thx nextjs)

This commit is contained in:
theoleuthardt 2025-02-13 01:09:37 +01:00
parent aa40c16a21
commit e11c705d3d

View file

@ -1,6 +1,7 @@
import React from "react"; import React from "react";
import Image from "next/image"; import Image from "next/image";
import LOGO from "../assets/werkzeugkasten.svg"; import LOGO from "../assets/werkzeugkasten.svg";
import Link from "next/link";
interface NavProps { interface NavProps {
className?: string; className?: string;
@ -17,21 +18,21 @@ const Navbar = (props: NavProps) => {
</div> </div>
<div className="flex flex-auto justify-center"> <div className="flex flex-auto justify-center">
{props.renderHomeLink ? ( {props.renderHomeLink ? (
<a <Link
href="/" href="/"
className="justify-center text-2xl hover:underline hover:transition-underline hover:duration-300 hover:text-blue-400" className="justify-center text-2xl hover:underline hover:transition-underline hover:duration-300 hover:text-blue-400"
> >
home home
</a> </Link>
) : null} ) : null}
</div> </div>
<div className="flex flex-1 justify-end"> <div className="flex flex-1 justify-end">
<a <Link
href="https://github.com/theoleuthardt/werkzeugkiste" href="https://github.com/theoleuthardt/werkzeugkiste"
className="items-end mr-3 text-2xl hover:underline hover:transition-underline hover:duration-300 hover:text-blue-400" className="items-end mr-3 text-2xl hover:underline hover:transition-underline hover:duration-300 hover:text-blue-400"
> >
github github
</a> </Link>
</div> </div>
</nav> </nav>
</div> </div>