From cda7589836eecde7951dd157d73025357f0bc0c0 Mon Sep 17 00:00:00 2001 From: vchikalkin Date: Mon, 7 Jun 2021 10:49:26 +0300 Subject: [PATCH] notification debounce constant --- src/client/Elements/Notification.ts | 3 ++- src/core/constants/debounce.js | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/client/Elements/Notification.ts b/src/client/Elements/Notification.ts index eb8d60a..7397fc3 100644 --- a/src/client/Elements/Notification.ts +++ b/src/client/Elements/Notification.ts @@ -1,4 +1,5 @@ import { notification } from 'antd'; +import { NOTIFICATION_DEBOUNCE } from 'core/constants/debounce'; import { debounce } from 'lodash'; type TNotification = 'success' | 'info' | 'warning' | 'error'; @@ -22,5 +23,5 @@ export const openNotification = ({ zIndex: 9999999999, }, }), - 750, + NOTIFICATION_DEBOUNCE, ); diff --git a/src/core/constants/debounce.js b/src/core/constants/debounce.js index 58f067e..4873980 100644 --- a/src/core/constants/debounce.js +++ b/src/core/constants/debounce.js @@ -1 +1,2 @@ export const DEFAULT_DEBOUNCE_DELAY = 350; +export const NOTIFICATION_DEBOUNCE = 750;