11import Head from "next/head" ;
2+ import Link from "next/link" ;
23import Image from "next/image" ;
34import { useRouter } from "next/router" ;
45import { Flex , Text } from "@chakra-ui/react" ;
@@ -9,7 +10,7 @@ import { Toast } from "@/components/Toast";
910export default function Confirmation ( ) {
1011 const route = useRouter ( ) ;
1112 const { addToast } = Toast ( ) ;
12- const [ hasEmail , setHasEmail ] = useState ( false ) ;
13+ const [ hasEmail , setHasEmail ] = useState ( true ) ;
1314 const hasInitiatedRef = useRef ( false ) ;
1415
1516 useEffect ( ( ) => {
@@ -26,11 +27,11 @@ export default function Confirmation() {
2627 message : "Parâmetro de e-mail não encontrado na URL." ,
2728 type : "error"
2829 } ) ;
30+
2931 return ;
3032 }
3133
3234 try {
33- setHasEmail ( true ) ;
3435 hasInitiatedRef . current = true ;
3536
3637 const response = await fetch ( "/api/sendConfirmationEmail" , {
@@ -111,6 +112,11 @@ export default function Confirmation() {
111112 < Text fontWeight = "normal" align = "center" color = "gray.300" mt = "2" >
112113 Parâmetro de e-mail não encontrado na URL.
113114 </ Text >
115+ < Link href = "/" >
116+ < Text color = "blue.500" align = "center" mt = "2" >
117+ Voltar para a página inicial
118+ </ Text >
119+ </ Link >
114120 </ >
115121 ) }
116122 </ Flex >
0 commit comments