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

2. As a user, I want to read all of my shopping lists and the items in them. #2

Closed
7 tasks done
fullybaked opened this issue Jan 29, 2024 · 0 comments · Fixed by #20
Closed
7 tasks done

2. As a user, I want to read all of my shopping lists and the items in them. #2

fullybaked opened this issue Jan 29, 2024 · 0 comments · Fixed by #20
Assignees

Comments

@fullybaked
Copy link
Contributor

fullybaked commented Jan 29, 2024

Summary

The most important feature of our app is the ability to look at their shopping lists to see what's on them, so the user knows what they need to buy. For this to work, we'll have to be able to choose a our shopping lists. The List (the active shopping list) and Home (where the user will be able to switch shopping lists) components are the best place in our code to do that. In fact, this feature is already partially implemented. Refer to the acceptance criteria in this issue, and the existing code, to understand the work that remains.

The List component is rendered on the /list page. Because the navigation links are currently broken, you'll have to type that path into your browser's address bar.

Acceptance criteria

  • The useShoppingLists hook is used in App.jsx to get the shopping lists a user has access to from the database
  • The lists are passed into the Home component as a prop named data
  • The setListPath function is passed into the Home component so we can update the current list
  • The useShoppingListData hook is used in App.jsx to get the items in the current list from the Firestore database
  • The list is passed into the List component as a prop named data
  • In Home.jsx, the SingleList component is used to render the name of each shopping list a user is subscribed to
  • In List.jsx, the ListItem component is used to render the name of each item

Notes

  • ⚠️ Your only goal is to make sure that the names of the items render as expected. You might be tempted to modify ListItem.jsx or SingleList.jsx to show more information – you will do that later.
  • The variables you need are already being passed into the List and Home components. What steps do you need to take in order to render them?
  • Additionally, until issues 4 and 5 you should only be able to see the shopping list that was manually added in issue 1.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants