From 2894f6bf244f66fa64ba8915db18763e78ef03c9 Mon Sep 17 00:00:00 2001 From: eug-vs Date: Sat, 24 Apr 2021 20:33:45 +0300 Subject: feat: add accounts service --- src/hooks/useAPIClient.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/hooks') diff --git a/src/hooks/useAPIClient.ts b/src/hooks/useAPIClient.ts index fd3ee19..72997f5 100644 --- a/src/hooks/useAPIClient.ts +++ b/src/hooks/useAPIClient.ts @@ -29,8 +29,8 @@ const registerServiceHooks = (service: string): void => { if (!result.data && result.isValidating) { // If we are waiting for the first result, check if we can maybe // get the data from already cached list for the time-being - const item = _.find(preloadedItems, { _id }); - return { ...result, data: item } as Response; + const item = _.find(preloadedItems, { _id }) as Item; + return { ...result, data: item }; } return result; }; -- cgit v1.2.3