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

Feature CustomerProfile #22

Open
areebsattar opened this issue Feb 24, 2024 · 0 comments
Open

Feature CustomerProfile #22

areebsattar opened this issue Feb 24, 2024 · 0 comments

Comments

@areebsattar
Copy link
Owner

From React-Module-Project created by SallyMcGrath: CodeYourFuture#20

20. Display a customer profile - iteration 1

Instructions:

Ccreate a new <CustomerProfile /> component. This component should be rendered next to the table in the <SearchResults /> component. This component should receive one prop id.

Add a new column in the table of the <SearchResults /> component and display a <button> for each row.
The text of the button should read "Show profile"

When clicking on a "Show profile" button for a given row, the component <CustomerProfile /> should display the text "Customer Profile", where is the id of the selected customer. Initially, the <CustomerProfile /> component doesn't show anything.

Hint: You need to record the selected customer id after clicking on a "Show profile" button. In which component do you think this state should be defined?

Test:

When first showing the page, no customer profile is displayed. When clicking the first "Show profile" button of the table, the text "Customer 1 profile" appears. When clicking the second "Show profile" button of the table, the text "Customer 2 profile" appears instead.

@areebsattar areebsattar moved this from 📋 Backlog to 🔖 Ready in [NW-6] React Module Project Mar 13, 2024
@areebsattar areebsattar moved this from 🔖 Ready to 🏗 In progress in [NW-6] React Module Project Mar 13, 2024
@areebsattar areebsattar moved this from 🏗 In progress to ✅ Done in [NW-6] React Module Project Mar 13, 2024
@areebsattar areebsattar moved this from ✅ Done to 👀 In review in [NW-6] React Module Project Mar 13, 2024
@Sabella-8 Sabella-8 moved this from 👀 In review to ✅ Done in [NW-6] React Module Project Mar 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

No branches or pull requests

2 participants