mirror of
https://github.com/umami-software/umami.git
synced 2025-12-08 05:12:36 +01:00
Refactored to use app folder.
This commit is contained in:
parent
40cfcd41e9
commit
9a52cdd2e1
258 changed files with 2025 additions and 2258 deletions
19
src/app/(app)/settings/teams/TeamsList.js
Normal file
19
src/app/(app)/settings/teams/TeamsList.js
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
'use client';
|
||||
import DataTable from 'components/common/DataTable';
|
||||
import TeamsTable from 'app/(app)/settings/teams/TeamsTable';
|
||||
import useApi from 'components/hooks/useApi';
|
||||
import useFilterQuery from 'components/hooks/useFilterQuery';
|
||||
|
||||
export function TeamsList() {
|
||||
const { get } = useApi();
|
||||
const filterQuery = useFilterQuery(['teams'], params => {
|
||||
return get(`/teams`, {
|
||||
...params,
|
||||
});
|
||||
});
|
||||
const { getProps } = filterQuery;
|
||||
|
||||
return <DataTable {...getProps()}>{({ data }) => <TeamsTable data={data} />}</DataTable>;
|
||||
}
|
||||
|
||||
export default TeamsList;
|
||||
Loading…
Add table
Add a link
Reference in a new issue