From 09dcb5da03e27b8ac7724846955cbb0ad366f3cd Mon Sep 17 00:00:00 2001 From: aelassas Date: Wed, 3 Apr 2024 17:20:15 +0000 Subject: [PATCH] Update helper.ts --- backend/src/common/helper.ts | 6 +++--- frontend/src/common/helper.ts | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/backend/src/common/helper.ts b/backend/src/common/helper.ts index 985056ed..ca1e0b24 100644 --- a/backend/src/common/helper.ts +++ b/backend/src/common/helper.ts @@ -21,7 +21,7 @@ export const getLanguage = (code: string) => env._LANGUAGES.find((l) => l.code = * @param {string} message */ export const info = (message: string) => { - toast(message, { type: 'info' }) + toast.info(message) } /** @@ -35,9 +35,9 @@ export const error = (err?: unknown, message?: string) => { console.error(err) } if (message) { - toast(message, { type: 'error' }) + toast.error(message) } else { - toast(commonStrings.GENERIC_ERROR, { type: 'error' }) + toast.error(commonStrings.GENERIC_ERROR) } } diff --git a/frontend/src/common/helper.ts b/frontend/src/common/helper.ts index abd781d4..db882f9a 100644 --- a/frontend/src/common/helper.ts +++ b/frontend/src/common/helper.ts @@ -20,7 +20,7 @@ export const getLanguage = (code: string) => env._LANGUAGES.find((l) => l.code = * @param {string} message */ export const info = (message: string) => { - toast(message, { type: 'info' }) + toast.info(message) } /** @@ -34,9 +34,9 @@ export const error = (err?: unknown, message?: string) => { console.error(err) } if (message) { - toast(message, { type: 'error' }) + toast.error(message) } else { - toast(commonStrings.GENERIC_ERROR, { type: 'error' }) + toast.error(commonStrings.GENERIC_ERROR) } }