From d37ceeb68feae6c05a83c96f8ae8417ead3e3460 Mon Sep 17 00:00:00 2001 From: goodmice Date: Tue, 12 Apr 2022 10:22:31 +0500 Subject: [PATCH] =?UTF-8?q?=D0=98=D1=81=D0=BF=D1=80=D0=B0=D0=B2=D0=BB?= =?UTF-8?q?=D0=B5=D0=BD=D0=BE=20=D0=BE=D1=82=D1=81=D1=83=D1=82=D1=81=D1=82?= =?UTF-8?q?=D0=B2=D0=B8=D0=B5=20=D0=BE=D1=82=D0=BF=D1=80=D0=B0=D0=B2=D0=BA?= =?UTF-8?q?=D0=B8=20=D0=B7=D0=B0=D0=BF=D1=80=D0=BE=D1=81=D0=B0=20=D0=BD?= =?UTF-8?q?=D0=B0=20=D1=81=D0=BB=D0=B8=D1=8F=D0=BD=D0=B8=D0=B5=20=D1=82?= =?UTF-8?q?=D0=B5=D0=BB=D0=B5=D0=BC=D0=B5=D1=82=D1=80=D0=B8=D0=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/AdminPanel/Telemetry/TelemetryMerger.jsx | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/pages/AdminPanel/Telemetry/TelemetryMerger.jsx b/src/pages/AdminPanel/Telemetry/TelemetryMerger.jsx index 31991d9..c97333e 100755 --- a/src/pages/AdminPanel/Telemetry/TelemetryMerger.jsx +++ b/src/pages/AdminPanel/Telemetry/TelemetryMerger.jsx @@ -59,14 +59,13 @@ export const TelemetryMerger = memo(() => { const mergeTelemetry = useCallback(() => invokeWebApiWrapperAsync( async () => { - await new Promise(res => setTimeout(res, 1000)) - /// await AdminTelemetryService.mergeTelemetries(secondary.id, primary.id) + await AdminTelemetryService.mergeTelemetries(secondary.id, primary.id) await updateTelemetry() }, setIsMerging, 'Не удалось объединить телеметрии', 'Объединение телеметрий', - ), [updateTelemetry]) + ), [updateTelemetry, secondary.id, primary.id]) useEffect(() => updateTelemetry(), [updateTelemetry]) @@ -76,7 +75,6 @@ export const TelemetryMerger = memo(() => { const secondaryId = parseInt(query.get('secondary') ?? null) const primary = isNaN(primaryId) ? null : telemetry.find((t) => t.id === primaryId) const secondary = isNaN(secondaryId) ? null : telemetry.find((t) => t.id === secondaryId) - console.log([primary, secondary]) setPrimary(primary) setSecondary(secondary) }, [location, telemetry])