fixing build error - not everything can be nice
This commit is contained in:
parent
53907ea9e1
commit
40c1d0b0a2
@ -2,15 +2,16 @@
|
|||||||
import Link from "next/link";
|
import Link from "next/link";
|
||||||
import { usePathname } from "next/navigation";
|
import { usePathname } from "next/navigation";
|
||||||
|
|
||||||
const link = (text: string, href: string) => {
|
const Navbar = () => {
|
||||||
const path = usePathname()
|
const path = usePathname()
|
||||||
|
const link = (text: string, href: string) => {
|
||||||
return (
|
return (
|
||||||
<Link data-selected={path === href} className="btn" aria-label={text} href={href}>
|
<Link data-selected={path === href} className="btn" aria-label={text} href={href}>
|
||||||
{text}
|
{text}
|
||||||
</Link>
|
</Link>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
const Navbar = () =>
|
return (
|
||||||
<div className="w-max h-max px-6 py-2 mx-auto rounded-full bg-slate-900 grid place-content-center">
|
<div className="w-max h-max px-6 py-2 mx-auto rounded-full bg-slate-900 grid place-content-center">
|
||||||
<div className="flex flex-row gap-6">
|
<div className="flex flex-row gap-6">
|
||||||
{link("Home", "/")}
|
{link("Home", "/")}
|
||||||
@ -18,5 +19,8 @@ const Navbar = () =>
|
|||||||
{link("Contact", "/contact")}
|
{link("Contact", "/contact")}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
export default Navbar
|
export default Navbar
|
||||||
|
Loading…
Reference in New Issue
Block a user