From 51d6e34519c4709da243c99976b9ec34016f33d1 Mon Sep 17 00:00:00 2001 From: Shashank Bairy R Date: Tue, 29 Sep 2020 18:15:26 +0530 Subject: [PATCH] fix: type fix --- plugins/catalog/src/hooks/useEntity.ts | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/plugins/catalog/src/hooks/useEntity.ts b/plugins/catalog/src/hooks/useEntity.ts index abbfd03b5b..77ea8c1569 100644 --- a/plugins/catalog/src/hooks/useEntity.ts +++ b/plugins/catalog/src/hooks/useEntity.ts @@ -58,8 +58,10 @@ export const useEntityFromUrl = (): EntityLoadingStatus => { * Always going to return an entity, or throw an error if not a descendant of a EntityProvider. */ export const useEntity = () => { - const { entity, loading, error } = useContext( - EntityContext as any, - ); + const { entity, loading, error } = useContext<{ + entity: Entity; + loading: boolean; + error: Error; + }>(EntityContext as any); return { entity, loading, error }; };