User Story
As a user, I should be able to remove an weapon.
AC
GIVEN the user is logged in and visits the weapons page
WHEN the user clicks "Delete"button on the weapon card
THEN the weapon is removed from firebase
AND update the DOM
Dev Notes
Create a function with an axios call in the helpers/data/weaponsData.js (deleteWeapon) file that allows user to delete weapon from Firebase and the DOM (axios.delete)
Create a "Delete" button that prints to every individual weapon card, located at the bottom and will have the ID of the weapon as the Id of the button.
This button will only delete the weapon card associated. The button should have an event listener that reads the weaponId from the button, and deletes the individual weapon from firebase.
The deleteWeapon eventlistener will call the deleteWeapon function to target the data within Firebase and delete it
Call createWeaponCard to update the dom when the delete is successful in the .then of the deleteWeapon call
User Story As a user, I should be able to remove an weapon.
AC
GIVEN the user is logged in and visits the weapons page WHEN the user clicks "Delete"button on the weapon card THEN the weapon is removed from firebase AND update the DOM
Dev Notes
Create a function with an axios call in the helpers/data/weaponsData.js (deleteWeapon) file that allows user to delete weapon from Firebase and the DOM (axios.delete)
Create a "Delete" button that prints to every individual weapon card, located at the bottom and will have the ID of the weapon as the Id of the button.
This button will only delete the weapon card associated. The button should have an event listener that reads the weaponId from the button, and deletes the individual weapon from firebase.
The deleteWeapon eventlistener will call the deleteWeapon function to target the data within Firebase and delete it
Call createWeaponCard to update the dom when the delete is successful in the .then of the deleteWeapon call