Далее JS Onclick vesigate

import { useRouter } from 'next/router';

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