umami/src/app/(main)/settings/teams/[teamId]/TeamMembers.tsx

17 lines
528 B
TypeScript
Raw Normal View History

2024-02-03 01:49:17 +00:00
'use client';
2023-10-01 23:11:12 +00:00
import DataTable from 'components/common/DataTable';
2024-01-26 07:20:53 +00:00
import TeamMembersTable from './TeamMembersTable';
2024-01-30 08:10:25 +00:00
import useTeamMembers from 'components/hooks/queries/useTeamMembers';
2023-01-10 07:59:26 +00:00
2024-01-30 08:10:25 +00:00
export function TeamMembers({ teamId, allowEdit }: { teamId: string; allowEdit: boolean }) {
const queryResult = useTeamMembers(teamId);
2023-01-10 07:59:26 +00:00
return (
2024-01-26 07:20:53 +00:00
<DataTable queryResult={queryResult}>
2024-01-30 08:10:25 +00:00
{({ data }) => <TeamMembersTable data={data} teamId={teamId} allowEdit={allowEdit} />}
2024-01-26 07:20:53 +00:00
</DataTable>
);
2023-01-10 07:59:26 +00:00
}
2023-04-21 15:00:42 +00:00
export default TeamMembers;