Skip to content

fix(auth): verification code button loading feedback and email gating - #27

Merged
Cho-Geer merged 3 commits into
developfrom
fix/register-send-code-spinner
Sep 23, 2026
Merged

Cho-Geer merged 3 commits into
developfrom
fix/register-send-code-spinner

Conversation

@Cho-Geer

Copy link
Copy Markdown
Owner

Summary

  • Pass isLoading to every send/resend verification-code button in LoginForm and RegisterForm so the shared Button atom shows its spinner while sendCode is pending (first-stage send: ade1c20, second-stage resend: 44687e3)
  • RegisterForm: add !email to 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 passed
  • npx tsc --noEmit — 0 errors
  • Full suite npx jest --silent — 14 suites / 109 tests passed
  • Manual: /register — spinner on first-stage send & resend buttons, empty-email click disabled

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.
@Cho-Geer Cho-Geer self-assigned this Sep 23, 2026
@Cho-Geer Cho-Geer added the bug Something isn't working label Sep 23, 2026
@Cho-Geer
Cho-Geer merged commit cd91f00 into develop Sep 23, 2026
5 checks passed
@Cho-Geer
Cho-Geer deleted the fix/register-send-code-spinner branch September 26, 2026 02:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants