mirror of
https://github.com/kremalicious/umami.git
synced 2024-11-15 17:55:08 +01:00
17 lines
478 B
JavaScript
17 lines
478 B
JavaScript
import { Loading } from 'react-basics';
|
|
import useApi from 'hooks/useApi';
|
|
import TeamMembersTable from 'components/pages/settings/teams/TeamMembersTable';
|
|
|
|
export default function TeamMembers({ teamId }) {
|
|
const { get, useQuery } = useApi();
|
|
const { data, isLoading } = useQuery(['teams:users', teamId], () =>
|
|
get(`/teams/${teamId}/users`),
|
|
);
|
|
|
|
if (isLoading) {
|
|
return <Loading icon="dots" position="block" />;
|
|
}
|
|
|
|
return <TeamMembersTable data={data} />;
|
|
}
|