fix: type fix

This commit is contained in:
Shashank Bairy R
2020-09-29 18:15:26 +05:30
parent 81703f1f1a
commit 51d6e34519
+5 -3
View File
@@ -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<EntityLoadingStatus>(
EntityContext as any,
);
const { entity, loading, error } = useContext<{
entity: Entity;
loading: boolean;
error: Error;
}>(EntityContext as any);
return { entity, loading, error };
};