Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
export const raiseNotificationToast = (notification: Notification) => {
const component = fetchComponent(notification);
const options: ToastOptions = {
bodyClassName: 'notification-toast-body',
closeButton: ,
position: toast.POSITION.TOP_RIGHT,
progressClassName: `notification-toast-progress-bar`,
toastId: notification.id,
type: ToastType.DEFAULT
};
if (notification.id && toast.isActive(notification.id)) {
const updateOptions = options as UpdateOptions;
updateOptions.render = component;
toast.update(notification.id, options);
}
else {
toast(component, options);
}
};