Skip to content

fix: Register "Remember me" checkbox with react-hook-form#66

Open
visshalb2007 wants to merge 2 commits into
Ashmita1206:mainfrom
visshalb2007:improve-ui
Open

fix: Register "Remember me" checkbox with react-hook-form#66
visshalb2007 wants to merge 2 commits into
Ashmita1206:mainfrom
visshalb2007:improve-ui

Conversation

@visshalb2007

Copy link
Copy Markdown

Problem

The "Remember me" checkbox on the login page was visually interactive
but never registered with react-hook-form. As a result, data.rememberMe
was always undefined in onSubmit, making the checkbox non-functional.

Changes Made

File: client/src/pages/LoginPage.jsx

  • Added {...register('rememberMe')} to the checkbox input so its
    value is captured on form submission
  • Added cursor-pointer to the wrapping <label> for better UX

Before

{/* value never captured */}

After

Testing

  • Checkbox value (true/false) is now accessible via data.rememberMe in onSubmit
  • Clicking the label text toggles the checkbox
  • No existing functionality broken

Note

Actual persistence logic (longer token expiry / storage strategy based
on rememberMe value) is a follow-up task.

@vercel

vercel Bot commented Jun 9, 2026

Copy link
Copy Markdown

@visshalb2007 is attempting to deploy a commit to the anglenobida003-8112's projects Team on Vercel.

A member of the Team first needs to authorize it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant