From fdef64da149ed0ceae3778238b9882a576e562ef Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Thu, 7 Dec 2023 23:36:01 -0800 Subject: verified flow --- src/lib/utils.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/lib') diff --git a/src/lib/utils.js b/src/lib/utils.js index adbe8356..f55b47b6 100644 --- a/src/lib/utils.js +++ b/src/lib/utils.js @@ -101,8 +101,8 @@ export function reverseFormat(val, locale) { export let protectedRoutes = [/customers/, /settings/, /payments/]; -export let success = (m) => { - toast.pop(); +export let success = (m, clear = true) => { + if (clear) toast.pop(); toast.push(m, { theme: { "--toastBarBackground": "#F5F7FA", @@ -110,16 +110,16 @@ export let success = (m) => { }); }; -export let warning = (m) => { - toast.pop(); +export let warning = (m, clear = true) => { + if (clear) toast.pop(); toast.push(m, { theme: { "--toastBarBackground": "#FFCE22", }, }); }; -export let fail = (m) => { - toast.pop(); +export let fail = (m, clear = true) => { + if (clear) toast.pop(); toast.push(m, { theme: { "--toastBarBackground": "#E93535", -- cgit v1.2.3