import { useRouter } from 'next/router' //... const router = useRouter() router.reload(window.location.pathname)
<Link href="/shop/[pid]" as={`/shop/${id}`}> <a>Shop by menu</a> </Link>