Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <Paper className={classes.root}>
- <Table>
- <TableHead>
- <TableRow>
- <TableCell>Name</TableCell>
- <TableCell>E-mail</TableCell>
- <TableCell>Role</TableCell>
- <TableCell>Edit</TableCell>
- <TableCell>Delete</TableCell>
- </TableRow>
- </TableHead>
- <TableBody>
- {Object.keys(this.state.users).map((user, i) => (
- <TableRow key={i}>
- <TableCell>{this.state.users[i].name}</TableCell>
- <TableCell>{this.state.users[i].email}</TableCell>
- <TableCell>{this.state.users[i].role}</TableCell>
- <TableCell>
- <IconButton
- aria-haspopup="true"
- onClick={() => this.editUser(i)}
- color="inherit"
- className={classes.iconButton}
- >
- <Edit />
- </IconButton>
- </TableCell>
- <TableCell>
- <IconButton
- aria-haspopup="true"
- onClick={() => this.confirmDeleteUser(this.state.users[i].id)}
- color="inherit"
- className={classes.iconButton}
- >
- <DeleteForever />
- </IconButton>
- </TableCell>
- </TableRow>
- )
- )}
- </TableBody>
- </Table>
- </Paper>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement