refactor(vojtechmares.com): use map to iterate over nav links
Signed-off-by: Vojtech Mares <iam@vojtechmares.com>
This commit is contained in:
parent
754f01c681
commit
f44d3b2a3d
1 changed files with 27 additions and 13 deletions
|
|
@ -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">
|
||||||
|
{links.map((link) =>
|
||||||
|
(
|
||||||
<Link
|
<Link
|
||||||
href="/#skoleni"
|
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"
|
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.name}
|
||||||
</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>
|
</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">
|
||||||
|
|
|
||||||
Reference in a new issue