import { useRouter } from 'next/router' const Post = () => { const router = useRouter() const { slug } = router.query const [pageName, pageTheme] = [...slug] return <p>Post: {pageName}</p> } export default Post