summaryrefslogtreecommitdiff
path: root/src/hooks
diff options
context:
space:
mode:
authoreug-vs <eug-vs@keemail.me>2021-04-24 20:33:45 +0300
committereug-vs <eug-vs@keemail.me>2021-04-24 20:34:45 +0300
commit2894f6bf244f66fa64ba8915db18763e78ef03c9 (patch)
treea9535e6265e5ad6a538a95b156eb58067021f608 /src/hooks
parentdfcad777da36002f9ec6350d7a7a07ebf4a1ada6 (diff)
downloadcommercel-ui-2894f6bf244f66fa64ba8915db18763e78ef03c9.tar.gz
feat: add accounts service
Diffstat (limited to 'src/hooks')
-rw-r--r--src/hooks/useAPIClient.ts4
1 files changed, 2 insertions, 2 deletions
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 = <Item = any>(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<Item>;
+ const item = _.find(preloadedItems, { _id }) as Item;
+ return { ...result, data: item };
}
return result;
};