small improvements

This commit is contained in:
daniel31x13
2024-05-16 15:50:43 -04:00
parent f68ca100a1
commit 142af9b5c0
3 changed files with 21 additions and 7 deletions
+6 -2
View File
@@ -1,3 +1,4 @@
import { signOut } from "next-auth/react";
import { useRouter } from "next/router";
import { useEffect } from "react";
import toast from "react-hot-toast";
@@ -18,7 +19,10 @@ const VerifyEmail = () => {
method: "POST",
}).then((res) => {
if (res.ok) {
toast.success("Email verified. You can now login.");
toast.success("Email verified. Signing out..");
setTimeout(() => {
signOut();
}, 3000);
} else {
toast.error("Invalid token.");
}
@@ -27,7 +31,7 @@ const VerifyEmail = () => {
console.log(token);
}, []);
return <div>Verify email...</div>;
return <></>;
};
export default VerifyEmail;