mirror of
https://github.com/umami-software/umami.git
synced 2026-02-15 18:15:35 +01:00
Updates to team components.
This commit is contained in:
parent
102f5b78b1
commit
dbb3801e66
28 changed files with 173 additions and 159 deletions
|
|
@ -1,20 +1,10 @@
|
|||
'use client';
|
||||
import DataTable from 'components/common/DataTable';
|
||||
import TeamsTable from 'app/(main)/settings/teams/TeamsTable';
|
||||
import { useApi, useFilterQuery } from 'components/hooks';
|
||||
import useCache from 'store/cache';
|
||||
import { useTeams } from 'components/hooks';
|
||||
|
||||
export function TeamsDataTable() {
|
||||
const { get } = useApi();
|
||||
const modified = useCache((state: any) => state?.teams);
|
||||
const queryResult = useFilterQuery({
|
||||
queryKey: ['teams', { modified }],
|
||||
queryFn: (params: any) => {
|
||||
return get(`/teams`, {
|
||||
...params,
|
||||
});
|
||||
},
|
||||
});
|
||||
const queryResult = useTeams();
|
||||
|
||||
return (
|
||||
<DataTable queryResult={queryResult}>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue