verify code slicing & function
This commit is contained in:
@@ -67,10 +67,10 @@ export default function VerifyCodeForm({ phoneOrEmail }: Props) {
|
||||
|
||||
const onSubmit = async (data: FormValuesProps) => {
|
||||
try {
|
||||
await new Promise((resolve) => setTimeout(resolve, 750));
|
||||
await new Promise((resolve) => setTimeout(resolve, 1000));
|
||||
await validateOtp(phoneOrEmail, Object.values(data).join(''));
|
||||
enqueueSnackbar('Verify success!');
|
||||
navigate('/dashboard');
|
||||
enqueueSnackbar('Verify success!', { variant: 'success' });
|
||||
} catch (error) {
|
||||
console.error(error);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user