import useMessages from 'hooks/useMessages'; import useUser from 'hooks/useUser'; import { ROLES } from 'lib/constants'; import { Flexbox, Table, TableBody, TableCell, TableColumn, TableHeader, TableRow, } from 'react-basics'; import TeamMemberRemoveButton from './TeamMemberRemoveButton'; export default function TeamMembersTable({ data = [], onSave, readOnly }) { const { formatMessage, labels } = useMessages(); const { user } = useUser(); const columns = [ { name: 'username', label: formatMessage(labels.username), style: { flex: 2 } }, { name: 'role', label: formatMessage(labels.role), style: { flex: 1 } }, { name: 'action', label: '', style: { flex: 1 } }, ]; return (