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. #1

Open
5 of 7 tasks
stacietaylorcima opened this issue Dec 18, 2023 · 0 comments
Open
5 of 7 tasks

Comments

@stacietaylorcima
Copy link
Contributor

stacietaylorcima commented Dec 18, 2023

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, you until issues 4 and 5 you should only be able to see the shopping list that was manually added in issue 1.
@stacietaylorcima stacietaylorcima changed the title 1. As a component, I want to be able to read from and write to the Firestore database so that users can persist information. #1 1. As a user, I want to read the names of all of the items in my shopping list Dec 18, 2023
@jeremiahfallin jeremiahfallin changed the title 1. As a user, I want to read the names of all of the items in my shopping list 1. As a user, I want to read all of my shopping lists and the items in them. Dec 21, 2023
@jeremiahfallin jeremiahfallin changed the title 1. As a user, I want to read all of my shopping lists and the items in them. 2. As a user, I want to read all of my shopping lists and the items in them. Dec 29, 2023
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

No branches or pull requests

1 participant