fix: otp input field single input limit in auth
This commit is contained in:
@@ -79,6 +79,7 @@ function AuthIndex({ }: Props) {
|
|||||||
const prev = otp.padEnd(6).split('');
|
const prev = otp.padEnd(6).split('');
|
||||||
prev[index] = e.target.value;
|
prev[index] = e.target.value;
|
||||||
const next = prev.join('');
|
const next = prev.join('');
|
||||||
|
if(otp.length >= 6 && next.trim().length >= otp.length) return;
|
||||||
setOtp(next.trimEnd());
|
setOtp(next.trimEnd());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user