Skip to content

[Good first issue]: Disable login submit until email looks valid #27

Description

@FrankezeCode

Summary

The “Send login code” button can be clicked with an empty or invalid email. Disable it until the email field contains @.

What should change?

  • In src/app/login/page.tsx, derive emailValid from input
  • Disable submit button when email is empty or missing @
  • Optional: subtle helper text (“Enter a valid email”)

Acceptance criteria

Button disabled for empty/invalid email
Button enables when email contains @
No API call on disabled submit

Checklist of done conditions:

  • Disabled state wired to button
  • Valid email enables submit
  • Code step unchanged
  • Keyboard submit still respects disabled state

How to test

  1. Open /login
  2. Confirm button disabled initially
  3. Type test → still disabled
  4. Type test@example.com → enabled
  5. Submit works

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions