NextJS Vérifiez le chemin de la page

import { useRouter } from 'next/router'

export default function Component() {
  const router = useRouter()
  console.log( router.pathname );
KostasX