Skip to content

Commit

Permalink
Add confirmation popup before unsubscribing
Browse files Browse the repository at this point in the history
  • Loading branch information
msagr committed Apr 7, 2024
1 parent 8b16bd5 commit 833355b
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,10 @@ export default defineComponent({
const currentProfile = deepCopy(profile)

if (this.isProfileSubscribed(profile)) {
// confirmation pop-up
if (!confirm('Are you sure you want to unsubscribe?')) {
return
}
currentProfile.subscriptions = currentProfile.subscriptions.filter((channel) => {
return channel.id !== this.channelId
})
Expand Down

0 comments on commit 833355b

Please sign in to comment.