As a user, I should be able to delete my missions.
AC
WHEN the missions page loads
THEN I should see a delete button
AND when I click that button, the entry should be removed from the database
AND the page should show the changes immediately.
DEV NOTES
[ ] in missionsData.js, create a new function called deleteMission
[ ] make an axios.delete() request
[ ] add an id to all of the mission cards in buildMissionsCards using a template literal and mission.id
[ ] add a delete button to each card using the buildMissionsCards function, use font awesome for skulls icon, add a class of mission-delete-button
[ ] add an event listener to the delete button using jquery .on() method
[ ] in buildAllMissions create a new function called removeMissionCard
[ ] takes a single argument of e
[ ] declare a variable called missionId
[ ] value is e.target.closest....
[ ] call the delete function from missionsData.js
[ ] use .then() to call buildAllMissions
[ ] then use .catch() to console.error a comment and the error
USER STORY
As a user, I should be able to delete my missions.
AC
WHEN the missions page loads THEN I should see a delete button AND when I click that button, the entry should be removed from the database AND the page should show the changes immediately.
DEV NOTES
missionsData.js
, create a new function calleddeleteMission
axios.delete()
requestbuildMissionsCards
using a template literal andmission.id
buildMissionsCards
function, use font awesome for skulls icon, add a class ofmission-delete-button
buildAllMissions
create a new function calledremoveMissionCard
e
missionId
missionsData.js
buildAllMissions