CFE-6 bug fix toast and make better flow for remove and add toast in page

This commit is contained in:
2023-10-31 15:11:53 +03:30
parent 73ca237817
commit cd90adee01
10 changed files with 59 additions and 58 deletions

View File

@@ -2,7 +2,7 @@ import BeenhereIcon from "@mui/icons-material/Beenhere";
import {Box, Typography} from "@mui/material";
import {toast} from "react-toastify";
const SuccessNotification = (notificationType, t, status) => {
const SuccessNotification = (pushToastList, notificationType, t, status) => {
const toastId = toast(
() => (
<>
@@ -38,7 +38,7 @@ const SuccessNotification = (notificationType, t, status) => {
draggable: true,
}
);
notification_type_id.success.push(toastId);
pushToastList(notificationType, toastId);
};
export default SuccessNotification;