Next js onclick navigue

import { useRouter } from 'next/router';

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