From d344c2dc99802f9af7cd13086afb89f2cbd5b3fb Mon Sep 17 00:00:00 2001 From: mrCherry97 Date: Fri, 8 Nov 2024 09:36:26 +0100 Subject: [PATCH] fix: toast adjustments --- src/shared/contexts/NotificationContext.tsx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/shared/contexts/NotificationContext.tsx b/src/shared/contexts/NotificationContext.tsx index 55a989d9d3..816354a8f7 100644 --- a/src/shared/contexts/NotificationContext.tsx +++ b/src/shared/contexts/NotificationContext.tsx @@ -39,7 +39,9 @@ export const NotificationProvider = ({ const methods = { notifySuccess: function(notificationProps: ToastProps) { setToastProps(notificationProps); - toast.current?.show(); + if (toast.current) { + toast.current.open = true; + } }, notifyError: function(notificationProps: Omit) { setErrorProps({ @@ -56,7 +58,7 @@ export const NotificationProvider = ({ ...methods, }} > - + {toastProps?.content} {errorProps &&