Skip to content

Commit

Permalink
Merge pull request #171 from PROCEED-Labs/ms2/fetch-data-bug-fix
Browse files Browse the repository at this point in the history
data hooks: use all params for react query key
  • Loading branch information
jjoderis authored Nov 24, 2023
2 parents 4339b3b + de2ba2c commit a615382
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions src/management-system-v2/lib/fetch-data.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit a615382

Please sign in to comment.