Closed stephencastaneda closed 4 years ago
As a user, when I delete a setSong, the set should delete along with it.
WHEN I click on the set page THEN I click on the delete button on a set list AND the set associated with that set should also delete in firebase
in Set.js
Set.js
removeSetSong
setId
setSongsData.deleteSetSong
.then
getSetSongs
.catch
render()
SetSongCard
in SetSongCard component
onClick
this.props
User Story
As a user, when I delete a setSong, the set should delete along with it.
AC
WHEN I click on the set page THEN I click on the delete button on a set list AND the set associated with that set should also delete in firebase
Dev Notes
in
Set.js
removeSetSong
function that takes insetId
setSongsData.deleteSetSong
and passes in asetId
.then
callsgetSetSongs
.catch
console logs unable to delete itemsrender()
removeSetSong
intoSetSongCard
componentin
SetSongCard
componentonClick
call the functionremoveSetSong
removeSetSong
function will need to first find thesetId
and then delete all the songs associated with thatsetId
removeSetSong
should be coming in fromthis.props