mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-08 22:45:45 +01:00
Added user add functionality
This commit is contained in:
34
scm-ui/src/users/containers/UserTable.js
Normal file
34
scm-ui/src/users/containers/UserTable.js
Normal 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;
|
||||
Reference in New Issue
Block a user