mirror of
https://github.com/umami-software/umami.git
synced 2026-02-10 07:37:11 +01:00
Refactored useQuery functions.
This commit is contained in:
parent
be550cc440
commit
b578162cb6
33 changed files with 179 additions and 151 deletions
|
|
@ -9,10 +9,9 @@ import useCache from 'store/cache';
|
|||
export function UsersDataTable() {
|
||||
const { get } = useApi();
|
||||
const modified = useCache(state => state?.users);
|
||||
const queryResult = useFilterQuery(['users', { modified }], params => {
|
||||
return get(`/users`, {
|
||||
...params,
|
||||
});
|
||||
const queryResult = useFilterQuery({
|
||||
queryKey: ['users', { modified }],
|
||||
queryFn: params => get(`/users`, params),
|
||||
});
|
||||
|
||||
return (
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue