Skip to main content
Version: Next

EmailVerifyModal

The email verify modal is used to tell the user that they need to verify their email address in order to continue their current flow, it also lets them resend the confirmation message in case they can't find it, or if it expired already.

Loading...

:::

Usage#

import React, { useEffect } from "react";
import {
EmailVerifyModal,
PelcroModalController,
usePelcro,
} from "@pelcro/react-pelcro-js";
import "@pelcro/react-pelcro-js/dist/pelcro.css";
export const EmailVerifyModalExample = () => {
const { switchView } = usePelcro();
return (
<>
<button onClick={() => switchView("email-verify")}>
Open email verification modal
</button>
<PelcroModalController>
<EmailVerifyModal />
</PelcroModalController>
</>
);
};

Reference#

Props#

onDisplay#

() โ‡’ void

Callback function called when the modal is first displayed.

onClose#

() โ‡’ void

Callback function called when the modal is closed.

onSuccess#

(userObject) โ‡’ void

Callback function called when the verification email is sent again successfully.

onFailure#

(errorObject) โ‡’ void

Callback function called when the verification email can't be sent again.