-
Notifications
You must be signed in to change notification settings - Fork 2
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
Delete button deletes item from list and firebase after user confirma… #49
Conversation
Visit the preview URL for this PR (updated for commit 58047e3): https://tcl-75-smart-shopping-list--pr49-gb-nk-delete-item-vgf3jdm3.web.app (expires Wed, 25 Sep 2024 18:00:24 GMT) 🔥 via Firebase Hosting GitHub Action 🌎 Sign: 1f1fd53c369e1fa31e15c310aa075b4e8f4f8dde |
…ndant label element and pass label as a prop to TextInputElement
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I left one comment. Other than that, it looks good!
src/views/List.jsx
Outdated
@@ -25,7 +25,7 @@ export function List({ data }) { | |||
<p>Welcome to {listName}!</p> | |||
<p>Ready to add your first item? Start adding below!</p> | |||
|
|||
<AddItems /> | |||
<AddItems items={items} /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
based on the failed test, i think you need to import items to use it as a prop for the AddItems component
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hey! thank you for catching that! i forgot to push the last changes, i think that this was breaking our deployed app, so i added this change
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good to me and passes all of the acceptance criteria. Tested locally and on the deployed versions.
Going to let this PR sit for a little to see if another mentor also wants to review to get you extra feedback. Otherwise, I'll merge this end of day tomorrow (Sept 19). Let me know if you don't want that to happen.
Description
This code renders a delete button for each list item. Once the user clicks the button, the app prompts them to confirm that they want to delete the item. Once approved, the item is removed from the list and the database.
Related Issue
closes #12
Acceptance Criteria
ListItem
component renders a button that allows the user to delete an item from their list when clickeddeleteItem
function inapi/firebase.js
has been filled out, and deletes the item from the Firestore databaseType of Changes
enhancement
Updates
Before
After
Testing Steps / QA Criteria