import { useRouter } from 'next/router'; export default function Home() { const router = useRouter(); useEffect(() => { router.push('/route'); }, []); return <></>; }