fix(auth): verification code button loading feedback and email gating - #27
Merged
Merged
Conversation
RegisterForm's first-stage 获取验证码 button omitted the isLoading prop, so the shared Button atom (which renders its spinner only when isLoading) showed no visual feedback during sendCode pending. LoginForm already passes it; this aligns register with login.
Both forms' second-stage resend buttons omitted isLoading, so no spinner appeared while a resend was in flight. Pass loading like the other buttons.
The first-stage button's disabled condition ignored an empty email while the send handler silently returns on invalid email, so clicking with an empty email gave no feedback.
youdingtianzhaogeyinzuo
approved these changes
Sep 23, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
isLoadingto every send/resend verification-code button in LoginForm and RegisterForm so the shared Button atom shows its spinner whilesendCodeis pending (first-stage send: ade1c20, second-stage resend: 44687e3)!emailto the first-stage button's disabled condition — clicking with an empty email previously gave no feedback at all (the send handler silently returns on invalid email) (359e806)Test plan
npx jest --testPathPattern "Button"— 8 passednpx tsc --noEmit— 0 errorsnpx jest --silent— 14 suites / 109 tests passed