From 6a18615a843a01d88baa416315dd5b12cf02a0cc Mon Sep 17 00:00:00 2001 From: Favour Olayinka Date: Mon, 13 May 2024 13:33:23 +0100 Subject: [PATCH] add c ancel button for confirm alert (#407) * add c ancel button for confirm alert * Refactor the No alertConfirm button --------- Co-authored-by: Julien Nahum --- client/composables/useAlert.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/composables/useAlert.js b/client/composables/useAlert.js index 015778c8..b294ff14 100644 --- a/client/composables/useAlert.js +++ b/client/composables/useAlert.js @@ -48,7 +48,7 @@ export function useAlert () { timeout: autoClose, actions: [ { label: options.successLabel ?? 'Yes', click: onSuccess }, - ...(onFailure ? [{ label: options.failureLabel ?? 'No', click: onFailure }] : []) + { label: options.failureLabel ?? 'No', click: onFailure } ], ...options })