Added user add functionality

This commit is contained in:
Philipp Czora
2018-07-11 17:02:38 +02:00
parent d35a56e07e
commit 1b6df5ee08
9 changed files with 317 additions and 38 deletions

View File

@@ -0,0 +1,34 @@
// @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;