mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-19 14:20:31 +00:00
fix(ReactQuery): add organization id in query keys.
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import { useMutation, useQuery, useQueryClient } from 'react-query';
|
||||
import { useMutation, useQueryClient } from 'react-query';
|
||||
import { useQueryTenant } from '../useQueryTenant';
|
||||
import { transformPagination } from 'utils';
|
||||
import useApiRequest from '../useRequest';
|
||||
import t from './types';
|
||||
@@ -71,7 +72,7 @@ const inventoryAdjustmentsTransformer = (response) => {
|
||||
export function useInventoryAdjustments(query, props) {
|
||||
const apiRequest = useApiRequest();
|
||||
|
||||
return useQuery(
|
||||
return useQueryTenant(
|
||||
['INVENTORY_ADJUSTMENTS', query],
|
||||
() => apiRequest.get('inventory_adjustments', { params: query })
|
||||
.then(inventoryAdjustmentsTransformer),
|
||||
|
||||
Reference in New Issue
Block a user