disabled login button when fields are empty
PR Fixes:
- Disables login button when no value is there in either of the input fields
Resolves #869
Checklist before requesting a review
- [x] I have performed a self-review of my code
- [x] I assure there is no similar/duplicate pull request regarding same issue
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
@iSouvikKhan change the component to controlled plz
@siinghd
https://github.com/user-attachments/assets/6bd5c614-489e-47c7-ba07-887e40ceea88
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