import { useRouter } from 'next/router'
const Post = () => {
const router = useRouter()
const { pid } = router.query
return <Link href={`/somepath/${pid}`}>Click</Link> // @typescript-eslint/restrict-template-expressions pid - string | string[] | undefined
}
export default Post