1
0
Fork 0

refactor(vojtechmares.com): use map to iterate over nav links

Signed-off-by: Vojtech Mares <iam@vojtechmares.com>
This commit is contained in:
Vojtěch Mareš 2024-01-01 13:23:21 +01:00
parent 754f01c681
commit f44d3b2a3d
Signed by: vojtech.mares
GPG key ID: C6827B976F17240D

View file

@ -2,6 +2,22 @@ import Link from "next/link";
import { Container } from "@/components/Container";
import { Button } from "@/components/Button";
import { link } from "fs";
const links = [
{
name: "Školení",
href: "/#skoleni",
},
{
name: "Blog",
href: "https://vojtechmares.blog/",
},
// {
// name: "Případové studie",
// href: "/pripadove-studie",
// },
];
export function Navigation() {
return (
@ -14,19 +30,17 @@ export function Navigation() {
<Link href="/" className="py-2 px-4 rounded-full focus-visible:outline-black">Vojtěch Mareš</Link>
</span>
<div className="hidden md:flex md:gap-x-6">
<Link
href="/#skoleni"
className="inline-block rounded-full py-2 px-4 text-lg font-medium text-slate-700 hover:bg-slate-100 hover:text-black focus-visible:outline-black"
>
Školení
</Link>
{/* <Link href="/pripadove-studie" className="inline-block rounded-full py-2 px-4 text-lg font-medium text-slate-700 hover:bg-slate-100 hover:text-black focus-visible:outline-black">Případové studie</Link> */}
<Link
href="https://vojtechmares.blog/"
className="inline-block rounded-full py-2 px-4 text-lg font-medium text-slate-700 hover:bg-slate-100 hover:text-black focus-visible:outline-black"
>
Blog
</Link>
{links.map((link) =>
(
<Link
key={link.name}
href={link.href}
className="inline-block rounded-full py-2 px-4 text-lg font-medium text-slate-700 hover:bg-slate-100 hover:text-black focus-visible:outline-black"
>
{link.name}
</Link>
)
)}
</div>
</div>
<div className="flex items-center gap-x-5 md:gap-x-8">