From 507631ab713bda633823e04fa4530b6f5d34a2c6 Mon Sep 17 00:00:00 2001 From: Ildar Kamalov Date: Tue, 12 Aug 2025 16:15:57 +0300 Subject: [PATCH] use batch --- client_v2/src/components/Settings/Settings.tsx | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/client_v2/src/components/Settings/Settings.tsx b/client_v2/src/components/Settings/Settings.tsx index c7a4b87e..b763094d 100644 --- a/client_v2/src/components/Settings/Settings.tsx +++ b/client_v2/src/components/Settings/Settings.tsx @@ -1,6 +1,6 @@ import React, { useEffect } from 'react'; import cn from 'clsx'; -import { shallowEqual, useDispatch, useSelector } from 'react-redux'; +import { shallowEqual, useDispatch, useSelector, batch } from 'react-redux'; import intl from 'panel/common/intl'; import { Checkbox } from 'panel/common/controls/Checkbox'; @@ -40,10 +40,12 @@ export const Settings = () => { const filtering = useSelector((state: RootState) => state.filtering, shallowEqual); useEffect(() => { - dispatch(initSettings()); - dispatch(getStatsConfig()); - dispatch(getFilteringStatus()); - dispatch(getLogsConfig()); + batch(() => { + dispatch(initSettings()); + dispatch(getStatsConfig()); + dispatch(getFilteringStatus()); + dispatch(getLogsConfig()); + }); }, []); const handleSettingToggle =