Overview
useVerifyUserEmail hook is used to handle the email verification process using a verification code. It leverages the react-query library to manage the asynchronous operation and provides error handling and success callbacks.Example Usage
verify-email-component.tsx
Parameters
() => void
required
callback function that is called when the email verification process is successful.
HttpErrorCallback
required
callback function that is called when an error occurs during the email verification process.
HttpErrorCallback type
Returns
(payload: {
userId: string;
verificationCode: string;
}) => void
function that triggers the email verification process with the provided verification code.
boolean
boolean indicating whether the email verification process is currently in progress.
boolean
boolean indicating whether an error occurred during the email verification process.
HttpError | Error | null
error object if an error occurred during the email verification process.