Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

disabled login button when fields are empty #870

Closed

Conversation

iSouvikKhan
Copy link
Contributor

@iSouvikKhan iSouvikKhan commented Aug 9, 2024

PR Fixes:

  • Disables login button when no value is there in either of the input fields

Resolves #869

Checklist before requesting a review

  • I have performed a self-review of my code
  • I assure there is no similar/duplicate pull request regarding same issue

@iSouvikKhan
Copy link
Contributor Author

iSouvikKhan commented Aug 9, 2024

Hi @siinghd,

This PR disables the login button when there is no input in either of the fields
I have added an useState variable to catch the input field entries and used the same for disabling/enabling the button
There is no change in the login functionality

As of now when I am creating this PR, there is only 1 PR other than mine which also addresses the same issue - #866
I went through its implementation, it has addressed the issue using toaster so I decided to create another PR which will address the same issue using Login button.

Thanks

@siinghd
Copy link
Collaborator

siinghd commented Aug 14, 2024

@iSouvikKhan change the component to controlled plz

@iSouvikKhan
Copy link
Contributor Author

iSouvikKhan commented Aug 15, 2024

@siinghd

PR.mp4

I have a couple of things to say,

  • I have changed only 1 file Signin.tsx, other files came for formatting
  • the format check is failing in this PR, each time I run yarn format:fix, format issue fixes locally, but while commiting, that change reverts automatically, I don't know why this is happening.

To make the component controlled I have used 2 useState() variables, I have tested code from my end.

Thanks

@devsargam devsargam closed this Sep 24, 2024
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.

bug: toast error / unwanted toast while signing in
3 participants