Summary
A shopping list is a set of items associated with the owner's unique id and the name of the shopping list. Users need to be able to create new shopping lists. To do this, the Home view should present them with a form that allows them to enter the name of their list. Additionally, we need to do a few things to create that list:
- Save the token to
localStorage
- Save the list to our database using the
createList function in firebase.js
- Show the user the list view
Acceptance criteria
UI-related tasks:
Data-related tasks:
Notes
- The
createList function takes three arguments: the current user's id, the current user's email, and the name of the shopping list.
- The
setListPath function takes one argument: the new list token.
- If you get stuck trying to redirect the user, check out the useNavigate hook from
react-rotuer.
Summary
A shopping list is a set of items associated with the owner's unique id and the name of the shopping list. Users need to be able to create new shopping lists. To do this, the
Homeview should present them with a form that allows them to enter the name of their list. Additionally, we need to do a few things to create that list:localStoragecreateListfunction infirebase.jsAcceptance criteria
UI-related tasks:
Homeview displays a form that allows users to enter the name of a shopping list and then create a list with that name.labelelement associated with itEnterkeyData-related tasks:
createListfunction insrc/api/firebase.jsto create a new shopping list for the user.setListPathfunction.Listview.Notes
createListfunction takes three arguments: the current user's id, the current user's email, and the name of the shopping list.setListPathfunction takes one argument: the new list token.react-rotuer.