From f07c5c1b1574949a2cbedf90c7e5d0c1772f5d3f Mon Sep 17 00:00:00 2001 From: AmirHossein Mahmoodi Date: Wed, 27 Sep 2023 10:04:35 +0330 Subject: [PATCH] TF-102 fixed bug notifications style --- .../components/notifications/ErrorNotification.jsx | 4 ++-- .../components/notifications/PendingNotification.jsx | 3 ++- .../components/notifications/SuccessNotification.jsx | 2 +- .../components/notifications/WarningNotification.jsx | 12 ++++++------ 4 files changed, 11 insertions(+), 10 deletions(-) diff --git a/src/core/components/notifications/ErrorNotification.jsx b/src/core/components/notifications/ErrorNotification.jsx index 4c2e857..05e2fb9 100644 --- a/src/core/components/notifications/ErrorNotification.jsx +++ b/src/core/components/notifications/ErrorNotification.jsx @@ -4,7 +4,7 @@ import {toast} from "react-toastify"; const ErrorNotification = (t, status, message) => { toast( - ({closeToast}) => ( + () => ( <> { ); }; -export default ErrorNotification; +export default ErrorNotification; \ No newline at end of file diff --git a/src/core/components/notifications/PendingNotification.jsx b/src/core/components/notifications/PendingNotification.jsx index f3a0af4..6183f6b 100644 --- a/src/core/components/notifications/PendingNotification.jsx +++ b/src/core/components/notifications/PendingNotification.jsx @@ -3,9 +3,10 @@ import {toast} from "react-toastify"; const PendingNotification = (t) => { toast(t("notifications.pending"), { autoClose: false, + closeButton: false, closeOnClick: false, draggable: false, }); }; -export default PendingNotification; +export default PendingNotification; \ No newline at end of file diff --git a/src/core/components/notifications/SuccessNotification.jsx b/src/core/components/notifications/SuccessNotification.jsx index 998deaa..3507cef 100644 --- a/src/core/components/notifications/SuccessNotification.jsx +++ b/src/core/components/notifications/SuccessNotification.jsx @@ -39,4 +39,4 @@ const SuccessNotification = (t, status) => { ); }; -export default SuccessNotification; +export default SuccessNotification; \ No newline at end of file diff --git a/src/core/components/notifications/WarningNotification.jsx b/src/core/components/notifications/WarningNotification.jsx index 5e931f0..19d6a2f 100644 --- a/src/core/components/notifications/WarningNotification.jsx +++ b/src/core/components/notifications/WarningNotification.jsx @@ -1,10 +1,10 @@ import ReportIcon from "@mui/icons-material/Report"; -import {Box, Divider, Typography} from "@mui/material"; +import {Box, Typography} from "@mui/material"; import {toast} from "react-toastify"; const WarningNotification = (t, status) => { toast( - ({closeToast}) => ( + () => ( <> { - {t("warning")} ({t("code")}: {status}) + {t("notifications.warning")} ({t("notifications.code")}:{" "} + {status}) - {t("warning_static_text")} + {t("notifications.warning_static_text")} - ), { @@ -37,4 +37,4 @@ const WarningNotification = (t, status) => { ); }; -export default WarningNotification; +export default WarningNotification; \ No newline at end of file