From 8c010990615468267490ff7dd119f21322e5948e Mon Sep 17 00:00:00 2001 From: Oliver Sand Date: Tue, 16 Feb 2021 12:47:11 +0100 Subject: [PATCH] useAsync instead of useAsyncRetry --- plugins/catalog-react/src/hooks/useRelatedEntities.ts | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/plugins/catalog-react/src/hooks/useRelatedEntities.ts b/plugins/catalog-react/src/hooks/useRelatedEntities.ts index 281ef217c1..b2ab93b607 100644 --- a/plugins/catalog-react/src/hooks/useRelatedEntities.ts +++ b/plugins/catalog-react/src/hooks/useRelatedEntities.ts @@ -15,7 +15,7 @@ */ import { Entity } from '@backstage/catalog-model'; import { useApi } from '@backstage/core'; -import { useAsyncRetry } from 'react-use'; +import { useAsync } from 'react-use'; import { catalogApiRef } from '../api'; export function useRelatedEntities( @@ -27,9 +27,7 @@ export function useRelatedEntities( error: Error | undefined; } { const catalogApi = useApi(catalogApiRef); - const { loading, value: entities, error } = useAsyncRetry< - Entity[] - >(async () => { + const { loading, value: entities, error } = useAsync(async () => { const relations = entity.relations && entity.relations.filter(