import { useRouter } from 'next/router'; // 컴포넌트 내부에서 const router = useRouter(); // 실제 URL 경로 (예: '/actual-path') console.log(router.asPath); // 라우트 패턴 (예: '/[slug]') console.log(router.pathname); // 동적 파라미터 (예: { slug: 'actual-path' }) console.log(router.query);