fix: control variables parameter in useApps hook
This commit is contained in:
@@ -3,7 +3,9 @@ import { useQuery } from '@tanstack/react-query';
|
|||||||
import api from 'helpers/api';
|
import api from 'helpers/api';
|
||||||
|
|
||||||
export default function useApps(variables) {
|
export default function useApps(variables) {
|
||||||
const trueOnlyVariables = Object.fromEntries(
|
const trueOnlyVariables =
|
||||||
|
variables &&
|
||||||
|
Object.fromEntries(
|
||||||
Object.entries(variables).filter(([_, value]) => value === true),
|
Object.entries(variables).filter(([_, value]) => value === true),
|
||||||
);
|
);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user