From b8454275c17e024abaa99e85ff8a85fbef3c1135 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gustaf=20R=C3=A4ntil=C3=A4?= Date: Wed, 2 Feb 2022 16:23:34 +0100 Subject: [PATCH] fix(cicd-statistics): Fixed progress bar animation, should be throttle, not debounce MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Gustaf Räntilä --- plugins/cicd-statistics/src/hooks/use-cicd-statistics.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/cicd-statistics/src/hooks/use-cicd-statistics.ts b/plugins/cicd-statistics/src/hooks/use-cicd-statistics.ts index bf3558b7dc..5c1fe1bfe2 100644 --- a/plugins/cicd-statistics/src/hooks/use-cicd-statistics.ts +++ b/plugins/cicd-statistics/src/hooks/use-cicd-statistics.ts @@ -15,7 +15,7 @@ */ import { useState, useEffect } from 'react'; -import { debounce } from 'lodash'; +import { throttle } from 'lodash'; import { Entity } from '@backstage/catalog-model'; import { @@ -62,7 +62,7 @@ export function useCicdStatistics( let mounted = true; let completed = false; // successfully or failed - const updateProgress = debounce((count, total, started = 0) => { + const updateProgress = throttle((count, total, started = 0) => { if (mounted && !completed) { setState({ loading: true,