fix: auto-submit OTP code on completion in get-started verification step
Add onComplete handler to OtpInput so the verification code auto-submits when all 6 digits are entered, matching the existing behavior in LoginOtpStep and OtpStep components. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
35ba8ab26a
commit
9754c73b64
@ -24,6 +24,10 @@ export function VerificationStep() {
|
|||||||
setCode(value);
|
setCode(value);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const handleCodeComplete = (value: string) => {
|
||||||
|
send({ type: "VERIFY_CODE", code: value });
|
||||||
|
};
|
||||||
|
|
||||||
const handleVerify = () => {
|
const handleVerify = () => {
|
||||||
if (code.length === 6) {
|
if (code.length === 6) {
|
||||||
send({ type: "VERIFY_CODE", code });
|
send({ type: "VERIFY_CODE", code });
|
||||||
@ -53,6 +57,7 @@ export function VerificationStep() {
|
|||||||
<OtpInput
|
<OtpInput
|
||||||
value={code}
|
value={code}
|
||||||
onChange={handleCodeChange}
|
onChange={handleCodeChange}
|
||||||
|
onComplete={handleCodeComplete}
|
||||||
disabled={loading}
|
disabled={loading}
|
||||||
error={error ?? undefined}
|
error={error ?? undefined}
|
||||||
autoFocus
|
autoFocus
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user