diff --git a/src/client/Elements/Notification.ts b/src/client/Elements/Notification.ts index e99b02a..3b11d3d 100644 --- a/src/client/Elements/Notification.ts +++ b/src/client/Elements/Notification.ts @@ -1,5 +1,6 @@ import { notification } from 'antd'; -import { throttle } from 'lodash'; +import { DEFAULT_DEBOUNCE_DELAY } from 'core/constants/debounce'; +import { debounce } from 'lodash'; type TNotification = 'success' | 'info' | 'warning' | 'error'; @@ -12,7 +13,7 @@ export const openNotification = ({ title: string; description: string; }) => - throttle( + debounce( () => notification[type]({ message: title, @@ -22,6 +23,5 @@ export const openNotification = ({ zIndex: 9999999999, }, }), - 3000, - { trailing: false }, + DEFAULT_DEBOUNCE_DELAY, );