Skip to content

fix: clear stale login error after successful registration - #29

Closed
jehanbheda wants to merge 1 commit into
drakeRAGE:mainfrom
jehanbheda:feature
Closed

jehanbheda wants to merge 1 commit into
drakeRAGE:mainfrom
jehanbheda:feature

Conversation

@jehanbheda

Copy link
Copy Markdown

Closes #25

This pull request fixes a UI bug where the login error message from a previous failed sign-in attempt persisted even after a successful registration and redirect to the Sign In page.

Changes Made:

Added a clearError reducer in userSlice.jsx to reset authentication errors.
Implemented a useEffect in SignIn.jsx to dispatch clearError() when the component mounts, ensuring the login page always loads in a clean state.

Steps to Verify:

Attempt to sign in with incorrect credentials → observe the error message.
Navigate to the Sign Up page → complete registration successfully.
After redirection to the Sign In page, confirm that the old error message no longer appears.

Result:

The Sign In page now correctly resets its state after a successful registration, improving user experience and reducing confusion.

@drakeRAGE
drakeRAGE self-requested a review October 29, 2025 06:54

@drakeRAGE drakeRAGE left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@drakeRAGE

Copy link
Copy Markdown
Owner

Hey @jehanbheda, great work on the PR! However, this issue was raised by someone else, so I can’t merge it. Really appreciate the effort ,feel free to pick another issue. Thanks!

@drakeRAGE drakeRAGE closed this Oct 29, 2025
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.

Error message state is not cleared

2 participants