Files
SCM-Manager/scm-ui/src/users/containers/UserTable.js

35 lines
719 B
JavaScript
Raw Normal View History

2018-07-11 17:02:38 +02:00
// @flow
import React from "react";
import UserRow from "./UserRow";
import type { User } from "../types/User";
type Props = {
users: Array<User>,
deleteUser: string => void
};
class UserTable extends React.Component<Props> {
render() {
const { users, deleteUser } = this.props;
return (
<table>
<thead>
<tr>
<th>Name</th>
<th>Display Name</th>
<th>E-Mail</th>
<th>Admin</th>
</tr>
</thead>
<tbody>
{users.map((user, index) => {
return <UserRow key={index} user={user} deleteUser={deleteUser} />;
})}
</tbody>
</table>
);
}
}
export default UserTable;