From 8c0d6021da5fdf19fea71d8192d472e12b7bd02d Mon Sep 17 00:00:00 2001 From: Nar Saynorath Date: Tue, 10 Dec 2024 16:10:30 -0500 Subject: [PATCH] Drop test-specific debounce time --- .../widgetBuilder/contexts/urlParamBatchContext.tsx | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/static/app/views/dashboards/widgetBuilder/contexts/urlParamBatchContext.tsx b/static/app/views/dashboards/widgetBuilder/contexts/urlParamBatchContext.tsx index 0a1c428f3de2e4..123191017156f7 100644 --- a/static/app/views/dashboards/widgetBuilder/contexts/urlParamBatchContext.tsx +++ b/static/app/views/dashboards/widgetBuilder/contexts/urlParamBatchContext.tsx @@ -12,9 +12,6 @@ import {DEFAULT_DEBOUNCE_DURATION} from 'sentry/constants'; import {useLocation} from 'sentry/utils/useLocation'; import {useNavigate} from 'sentry/utils/useNavigate'; -const {NODE_ENV, TEST_SUITE} = process.env; -const IS_TEST = NODE_ENV === 'test' || !!TEST_SUITE; - type BatchContextType = { batchUrlParamUpdates: (updates: Record) => void; flushUpdates: () => void; @@ -53,12 +50,9 @@ export function UrlParamBatchProvider({children}: {children: React.ReactNode}) { // Debounce URL updates const updateURL = useMemo( () => - debounce( - () => { - flushUpdates(); - }, - IS_TEST ? 0 : DEFAULT_DEBOUNCE_DURATION - ), + debounce(() => { + flushUpdates(); + }, DEFAULT_DEBOUNCE_DURATION), [flushUpdates] );