(campaign: Campaign)
| 85 | }; |
| 86 | |
| 87 | const onStopBoost = async (campaign: Campaign) => { |
| 88 | if (!(await showPrompt(stopBoostPromptOptions))) { |
| 89 | return; |
| 90 | } |
| 91 | |
| 92 | // The mutation already shows a toast when it fails |
| 93 | const data = await onCancelBoost(campaign).catch(() => null); |
| 94 | |
| 95 | if (data?.transactionId) { |
| 96 | clearBoostedFlag(campaign); |
| 97 | } |
| 98 | }; |
| 99 | |
| 100 | return { onStopBoost, isStopping: isLoadingCancel }; |
| 101 | }; |
nothing calls this directly
no test coverage detected