The dialog is the ordinary one:
confirm ({ title : " Delete this campaign? " , text : " This removes the brief, results, conversations and drafts for this campaign. It can't be undone. " , action : " Delete " , destructive : true , run : () => run (() => deleteCampaignAction ( campaignId )), })
Enter fullscreen mode
Exit fullscreen mode
The function behind it is not. Deleting a campaign in Nakodo cannot be a cascade, because some of what hangs off a campaign is a promise made to somebody who is not our customer. If a creator replies "no thanks", we do not write to them again for six months. That promise has to survive the brand deleting the campaign it was made in, otherwise deleting a campaign becomes the way to get around it.
So the whole thing is four statements and a comment that is longer than any of them:
// Deletes a campaign with its results, keywords and queued work.…