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])