From 95a1699f2fb08e5daf504a80e7c40b5616cf68a8 Mon Sep 17 00:00:00 2001 From: Paul Valerie GOMA Date: Thu, 31 Jul 2025 11:11:26 +0200 Subject: [PATCH] =?UTF-8?q?=E2=99=BB=EF=B8=8F=20=20refactor:=20useAlert=20?= =?UTF-8?q?composable=20updated?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/composable/useAlert.ts | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/src/components/composable/useAlert.ts b/src/components/composable/useAlert.ts index 5547d7a..0d21486 100644 --- a/src/components/composable/useAlert.ts +++ b/src/components/composable/useAlert.ts @@ -2,23 +2,24 @@ import { useToast } from "primevue/usetoast"; import type IVAlert from "@/components/alert/IVAlert.type.js"; export function useAlert() { - const toast = useToast(); - const showAlert = ({ title = '', description = '', type = 'info', closeable = true, lifeTime, - }: IVAlert) => { + }: IVAlert) => { + const toast = useToast(); + toast.add({ severity: type, summary: title, detail: description, life: lifeTime, closable: closeable, - }) - } + }); + }; - return { showAlert} + return { showAlert }; } +