Skip to content

Conversation

CodeOnTheWall
Copy link

Enjoy

…eaned up the default code in the layout, page, and globals.css. Inside layout, added app wide metadata via the new nextjs 13 features that include an exported metadata function for better seo, for when webcrawlers crawl the internet. Its app wide since the route layout wraps all pages, and will be the default metadata unless we give a page metadata, for which it would be page specific metadata
…rate best practices, I made the form a custom form that provides scalability, so if we eventually have multiple inputs, we can use this custom form to map over inputs. This ensures that if we eventualy have a form with multiple inputs, the form always stays the same but is passed the values from the page in a more readable way. Added an extra security feature of canSave, where if the email and password are not booleans, you cant use the button. Added basic tailwind styling for basic viewing. State of email and password is managed via useState, with the values being updated via their respective handler functions.
…nvalid state, if email doesnt contain @, both the error message will be set, and the boolean value of formIsInvalid will be set. And vice versa, to clear the styling and error message, if it does contain an @, the error message is cleared, and the error styling is taken away. Just as the last commits suggest, its always good to demonstrate the scalability, hence in the CustomFOrm component, we also have more control on how to style the label based on that labels error, if you did want to style different errors differently
@CodeOnTheWall
Copy link
Author

Great

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.

1 participant