Fix button and link executions

This commit is contained in:
Hannah 2026-09-28 16:14:03 +02:00
commit 4ad42312b1
8 changed files with 94 additions and 69 deletions

21
components/ui/NavLink.tsx Normal file
View file

@ -0,0 +1,21 @@
import Link from "next/link";
export default function NavLink({
name,
link,
external = false,
}: {
name: string;
link: string;
external?: boolean;
}) {
return (
<div className="bg-slate-400 dark:bg-slate-800 hover:bg-slate-600 font-medium py-2 px-4 rounded-lg shadow-md transition duration-200 ease-in-out">
<Link href={`${external ? "https:" : ""}${link}`} className="block">
<h1 className="font-semibold text-slate-800dark:text-slate-400 text-lg">
{name}
</h1>
</Link>
</div>
);
}