From de2ba2cbea7151b0f9393c692ed8e631136b1032 Mon Sep 17 00:00:00 2001 From: Felipe Trost Date: Thu, 23 Nov 2023 21:42:59 +0100 Subject: [PATCH] data hooks: use all params for react query key --- src/management-system-v2/lib/fetch-data.ts | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/src/management-system-v2/lib/fetch-data.ts b/src/management-system-v2/lib/fetch-data.ts index 758257a1f..630e292a0 100644 --- a/src/management-system-v2/lib/fetch-data.ts +++ b/src/management-system-v2/lib/fetch-data.ts @@ -133,13 +133,8 @@ export type ApiData< function getKeys(path: any, params: any) { const keys = [path]; - if ( - typeof params === 'object' && - 'params' in params && - typeof params.params === 'object' && - 'path' in params.params - ) { - keys.push(params.params.path as any); + if (typeof params === 'object' && 'params' in params && typeof params.params === 'object') { + keys.push(params.params as any); } return keys;