Anupkjha2601 / foodie-blog

here i create a food store web apps named Foodie Blog that helps the customer to find good products in cheap rates and genuine product.
https://anupkjha2601.github.io/foodie-blog/
5 stars 19 forks source link

Update login-page.js #56

Closed hemant933 closed 8 months ago

hemant933 commented 8 months ago

1.The 'validateCredentials' function checks whether the provided username and password are valid. This makes the code more modular and allows for easier changes to the validation logic. 2.The 'redirectToPage' function abstracts the logic for redirecting to a specific page. This can be useful if you need to change the redirection logic in the future. 3.The 'showLoginError' function encapsulates the logic for displaying the login error message. It makes the code more self-explanatory.