This repository has been archived on 2024-10-29. You can view files and clone it, but cannot push or open issues or pull requests.
FunctionProject/website/components/Header/NavigationLink.jsx
2020-12-28 13:07:21 +01:00

21 lines
434 B
JavaScript

import Link from 'next/link'
import { useRouter } from 'next/router'
export default function NavigationLink (props) {
const { pathname } = useRouter()
return (
<li className='navbar-item'>
<Link href={props.path}>
<a
className={`navbar-link ${
pathname === props.path ? 'navbar-link-active' : null
}`}
>
{props.name}
</a>
</Link>
</li>
)
}