jazz
jazz copied to clipboard
Music Player Example - Add a "Delete Playlist" button
Add a "Delete Playlist" button on the top right of the playlist page
- The button shouldn't be visible in the "All tracks" page
- The action should prompt a confirm popup before actually deleting the playlist
- E2E tests to cover the flow are welcome. (Look at #465)
To delete a playlist it will be enough to remove the playlist reference from the account root:
const playlistIndex = account.root.playlists.findIndex(({ id }) => id === playlist.id)
if (playlistIndex > -1) account.root.playlists.splice(playlistIndex, 1);