/*! Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. SPDX-License-Identifier: Apache-2.0 */ import { BaseTable, BaseTableProps } from '$common/components/tables'; import { Column } from 'aws-northstar/components/Table'; import { GroupLinkList } from '$common/entity/group'; import { UserLink, UserProfile, useFederatedUsers } from '$common/entity/user'; import { useHistory } from 'react-router-dom'; import { useI18nContext } from '@ada/strings/dist/i18n/i18n-react'; import React, { useMemo } from 'react'; /* eslint-disable sonarjs/no-duplicate-string */ export type UserTableProps = Omit, 'columnDefinitions' | 'items'>; export const UserTable: React.FC = ({ selector: _selector, ...props }) => { const { LL } = useI18nContext(); const history = useHistory(); const users = useFederatedUsers(); const columnDefinitions: Column[] = useMemo( () => [ { id: 'id', accessor: 'id', width: 0.5, Header: LL.ENTITY['UserProfile@'].id.label(), Cell: ({ value }) => , }, { id: 'name', accessor: 'name', Header: LL.ENTITY['UserProfile@'].name.label(), width: 0.25, }, { id: 'email', accessor: 'email', Header: LL.ENTITY['UserProfile@'].email.label(), width: 0.25, }, { id: 'groups', accessor: 'groups', width: 2, Header: LL.ENTITY['UserProfile@'].groups.label(), Cell: ({ value }) => , }, ], [history], ); return ( <> ); };