I want to show a toast when user will be sign up and getting verification email. But Toast dosen't show.
const navigate=useNavigate();
const from = location.state?.from?.pathname || "/";
const[confirmPassword, setConfirmPassword]=useState("");
const [
createUserWithEmailAndPassword,
user,
loading,
error,
] = useCreateUserWithEmailAndPassword(auth, {sendEmailVerification: true} );
if(loading){
return <div><Loading></Loading></div>
}
let element;
if (error) {
element = <p>Error: {error.message}</p>
}
if (user) {
navigate(from, { replace: true });
toast('sending email verification')
}