Devamani11D / salt-app-kickstart

A CLI tool that can be installed as an npm package, featuring pre-installed Salt dependencies and templates such as AGGrid, Dashboard etc. Simplifies project setup by automatically launching on localhost.
10 stars 26 forks source link

Update Login.js added Loading State for the Submit Button #51

Closed ananyag309 closed 1 month ago

ananyag309 commented 1 month ago

Fixes #36

Added a new state variable isLoading using useState(false). In the handleSubmit function, we set isLoading to true just before making the API call. We added a .finally() block to the axios promise chain to set isLoading back to false when the API call completes, regardless of success or failure. We updated the Submit Button to: Disable the button when isLoading is true. Change the button text to "Signing In..." when loading, and "Sign In" when not loading. These changes will provide visual feedback to the user when the form is being submitted, preventing multiple submissions and indicating that the system is processing their request.

Type of change

How should this be tested?

Mandatory Tasks

github-actions[bot] commented 1 month ago

🎉 Your pull request has been successfully merged! 🎉 Thank you for your contribution to our project. Your efforts are greatly appreciated. Keep up the fantastic work! 🚀

ananyag309 commented 1 month ago

@Devamani11D please add Gssoc ext label. Sure from now on I will add ss