mirror of
https://github.com/umami-software/umami.git
synced 2026-02-12 00:27:11 +01:00
Typescript refactor.
This commit is contained in:
parent
b578162cb6
commit
7c42f0da82
173 changed files with 968 additions and 549 deletions
|
|
@ -1,29 +0,0 @@
|
|||
'use client';
|
||||
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 modified = useCache(state => state?.teams);
|
||||
const queryResult = useFilterQuery({
|
||||
queryKey: ['teams', { modified }],
|
||||
queryFn: params => {
|
||||
return get(`/teams`, {
|
||||
...params,
|
||||
});
|
||||
},
|
||||
});
|
||||
|
||||
return (
|
||||
<DataTable queryResult={queryResult}>
|
||||
{({ data }) => {
|
||||
return <TeamsTable data={data} />;
|
||||
}}
|
||||
</DataTable>
|
||||
);
|
||||
}
|
||||
|
||||
export default TeamsDataTable;
|
||||
Loading…
Add table
Add a link
Reference in a new issue