Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MM-103: Home component form which gets user's name #8

Merged
merged 2 commits into from
Jul 31, 2024

Conversation

natashabuckham
Copy link
Collaborator

Implements form in Home component to get user's name, stores it in useState, tests that user's name is displayed on form submission

Description of changes - what did you do

  • create ejs form in return statement in Home component that asks for user's name
  • add use state to store the name
  • use onChange to update the use state variable - add comment that this can then be passed as a prop to a quiz component
  • Add an onSubmit which will display 'Hi !' as feedback to the user that their name has been submitted
  • Test that 'Hi ' appears

Screenshots - for changes to the UI

Screenshot 2024-07-31 113345

Things to Check

  • Have all the requirments of your ticket have been met
  • Have you added tests if needed for your ticket
  • Are all the tests passing

@natashabuckham natashabuckham requested a review from Kiran-R-K July 31, 2024 10:35
@natashabuckham natashabuckham changed the title Home component form which gets user's name MM-103: Home component form which gets user's name Jul 31, 2024
Copy link
Contributor

@Kiran-R-K Kiran-R-K left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Really good - well done

@Kiran-R-K Kiran-R-K merged commit 3db5aea into main Jul 31, 2024
1 check passed
@Kiran-R-K Kiran-R-K deleted the mm-103-homepage-name-input branch August 2, 2024 10:11
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.

2 participants