import { useRouter } from 'next/router'
function Home() {
const router = useRouter()
const handleClick = e => {
e.preventDefault()
router.push('/some-path')
}
return (
<button type="button" onClick={handleClick}>
Go Somewhere
</button>
)
}
import { useRouter } from 'next/router';
const NavComponent = ({navItems,logo})=> {
const router = useRouter()
return (
<div onClick={() => {
router.push('/');
}}
className="h-auto transition cursor-pointer hover:scale-105"
>
<h4 className="text-2xl text-white uppercase font-neuro hover:text-secondary text-shadow">Straw Hats</h4>
</div>
)}