mirror of
https://github.com/umami-software/umami.git
synced 2026-02-10 15:47:13 +01:00
Refactored teams components.
This commit is contained in:
parent
6253d55790
commit
8b48130d5f
18 changed files with 75 additions and 44 deletions
|
|
@ -3,10 +3,12 @@ import DataTable from 'components/common/DataTable';
|
|||
import TeamsTable from 'app/(main)/settings/teams/TeamsTable';
|
||||
import useApi from 'components/hooks/useApi';
|
||||
import useFilterQuery from 'components/hooks/useFilterQuery';
|
||||
import useCache from 'store/cache';
|
||||
|
||||
export function TeamsDataTable() {
|
||||
const { get } = useApi();
|
||||
const queryResult = useFilterQuery(['teams'], params => {
|
||||
const modified = useCache(state => state?.websites);
|
||||
const queryResult = useFilterQuery(['teams', { modified }], params => {
|
||||
return get(`/teams`, {
|
||||
...params,
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue