const handleUserVerification = async (email: string, status: boolean) => {
if (!status) {
const { error } = await client.sendVerificationEmail({
email,
callbackURL: '/login' // The redirect URL after verification
})
if (!error) {
toast.add({
title: 'Email Sent!',
description: Email has been sent to: ${email}.,
})
} else {
toast.add({
title: 'Error',
description: error.message,
})
}
return
}
// Show Toast message
toast.add({
title: 'User Already Verified!',
description: 'User has been accepted verification email.',
})
}