You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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:
The Home view displays a form that allows users to enter the name of a shopping list and then create a list with that name.
The input that accepts the name of the item has a semantic label element associated with it
The user can submit this form with both the mouse and the Enter key
When the user submits the form, they see a message indicating that the list either was or was not created and saved to the database.
Data-related tasks:
Clicking the button uses the createList function in src/api/firebase.js to create a new shopping list for the user.
The shopping list path is stored in local storage using the setListPath function.
Once the list has been created and saved, the user is redirected to the List view.
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.
The text was updated successfully, but these errors were encountered:
jeremiahfallin
changed the title
3. As a user, I want to set up a new shopping list so I can start tracking purchased items
3. As a user, I want to set up a new shopping list so I can start tracking purchased items.
Dec 21, 2023
jeremiahfallin
changed the title
3. As a user, I want to set up a new shopping list so I can start tracking purchased items.
4. As a user, I want to set up a new shopping list so I can start tracking purchased items.
Dec 29, 2023
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:localStorage
createList
function infirebase.js
Acceptance criteria
UI-related tasks:
Home
view displays a form that allows users to enter the name of a shopping list and then create a list with that name.label
element associated with itEnter
keyData-related tasks:
createList
function insrc/api/firebase.js
to create a new shopping list for the user.setListPath
function.List
view.Notes
createList
function takes three arguments: the current user's id, the current user's email, and the name of the shopping list.setListPath
function takes one argument: the new list token.react-rotuer
.The text was updated successfully, but these errors were encountered: