const [email] = useEmailSignUpStore((state) => [state.email], shallow);
const verifyCode = async (formData) => {
setErrorMSG(null)
setLoading(true)
const token = formData.otpInput
const { error } = await supabase.auth.verifyOtp({ email, token, type: 'signup' })
if (!error) {
setLoading(false)
router.push('/sign-up/with-email/complete-profile')
} else {
setLoading(false)
console.log(error)
setErrorMSG('Invalid Verification Code')
}
}
const [email] = useEmailSignUpStore((state) => [state.email], shallow);
const verifyCode = async (formData) => {
setErrorMSG(null)
setLoading(true)
const token = formData.otpInput
const { error } = await supabase.auth.verifyOtp({ email, token, type: 'signup' })
if (!error) {
setLoading(false)
router.push('/sign-up/with-email/complete-profile')
} else {
setLoading(false)
console.log(error)
setErrorMSG('Invalid Verification Code')
}
}