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 { Container } from "@/components/Container";
import { Button } from "@/components/Button"; 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() { export function Navigation() {
return ( 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> <Link href="/" className="py-2 px-4 rounded-full focus-visible:outline-black">Vojtěch Mareš</Link>
</span> </span>
<div className="hidden md:flex md:gap-x-6"> <div className="hidden md:flex md:gap-x-6">
<Link {links.map((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" <Link
> key={link.name}
Školení href={link.href}
</Link> 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 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 {link.name}
href="https://vojtechmares.blog/" </Link>
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>
</div> </div>
</div> </div>
<div className="flex items-center gap-x-5 md:gap-x-8"> <div className="flex items-center gap-x-5 md:gap-x-8">