import React, { useState } from 'react'; import { connect } from 'react-redux'; import { Tooltip } from 'UI'; import { resendEmailVerification } from 'Duck/user'; import { toast } from 'react-toastify'; function EmailVerificationMessage(props) { const [sent, setSent] = useState(false); const { email } = props; const send = () => { props.resendEmailVerification(email).then(function () { toast.success(`Verification email sent to ${email}`); setSent(true); }); }; return !sent ? (
Please, verify your email.{' '} Resend
) : ( <> ); } export default connect(null, { resendEmailVerification })(EmailVerificationMessage);