This PR addresses the issue outlined in (#65), which allowed users to log in without valid credentials. The following enhancements have been made to address this:
Implemented input validation on the login form to ensure that both username and password fields are filled before attempting a login.
Corrected the response handling in the useLogin hook. The previous implementation executed success operations even when the server returned an error status. This has been amended to appropriately to set an error message, signalling a failed login when the server response is not OK.
Screenshots:
Input validation:
Appropriate user-feedback during incorrect credentials:
This PR addresses the issue outlined in (#65), which allowed users to log in without valid credentials. The following enhancements have been made to address this:
Screenshots:
Input validation:
Appropriate user-feedback during incorrect credentials: