From 2f18f97f987d769c30bfc6273796d9250226ada2 Mon Sep 17 00:00:00 2001 From: Jonathan Mezach Date: Tue, 18 Apr 2023 10:40:04 +0200 Subject: [PATCH] Fix endless loop Signed-off-by: Jonathan Mezach --- .../EntityPageOctopusDeploy.tsx | 6 +++--- .../octopus-deploy/src/hooks/useReleases.ts | 18 +++++++++++------- 2 files changed, 14 insertions(+), 10 deletions(-) diff --git a/plugins/octopus-deploy/src/components/EntityPageOctopusDeploy/EntityPageOctopusDeploy.tsx b/plugins/octopus-deploy/src/components/EntityPageOctopusDeploy/EntityPageOctopusDeploy.tsx index 34ff780f70..5fc035595c 100644 --- a/plugins/octopus-deploy/src/components/EntityPageOctopusDeploy/EntityPageOctopusDeploy.tsx +++ b/plugins/octopus-deploy/src/components/EntityPageOctopusDeploy/EntityPageOctopusDeploy.tsx @@ -28,11 +28,11 @@ export const EntityPageOctopusDeploy = (props: { defaultLimit?: number }) => { const projectId = getProjectIdAnnotationFromEntity(entity); const spaceId = getSpaceIdAnnotationFromEntity(entity); - const { environments, releases, loading, error } = useReleases({ + const { environments, releases, loading, error } = useReleases( projectId, + props.defaultLimit ?? 3, spaceId, - releaseHistoryCount: props.defaultLimit ?? 3, - }); + ); return ( { - return api.getReleaseProgression(opts); - }, [api, opts]); + return api.getReleaseProgression({ + projectId, + spaceId, + releaseHistoryCount, + }); + }, [api, projectId, spaceId, releaseHistoryCount]); return { environments: value?.Environments,