diff options
Diffstat (limited to 'modern/src/admin')
-rw-r--r-- | modern/src/admin/UsersPage.js | 19 |
1 files changed, 7 insertions, 12 deletions
diff --git a/modern/src/admin/UsersPage.js b/modern/src/admin/UsersPage.js index d0861f1c..630bea43 100644 --- a/modern/src/admin/UsersPage.js +++ b/modern/src/admin/UsersPage.js @@ -3,14 +3,11 @@ import MainToolbar from '../MainToolbar'; import { TableContainer, Table, TableRow, TableCell, TableHead, TableBody, makeStyles, IconButton } from '@material-ui/core'; import MoreVertIcon from '@material-ui/icons/MoreVert'; import t from '../common/localization'; -import formatter from '../common/formatter'; import { useEffectAsync } from '../reactHelper'; import EditCollectionView from '../EditCollectionView'; +import { formatBoolean } from '../common/formatter'; const useStyles = makeStyles(theme => ({ - root: { - height: '100%', - }, columnAction: { width: theme.spacing(1), padding: theme.spacing(0, 1), @@ -49,10 +46,10 @@ const UsersView = ({ updateTimestamp, onMenuClick }) => { <MoreVertIcon /> </IconButton> </TableCell> - <TableCell>{formatter(item, 'name')}</TableCell> - <TableCell>{formatter(item, 'email')}</TableCell> - <TableCell>{formatter(item, 'administrator')}</TableCell> - <TableCell>{formatter(item, 'disabled')}</TableCell> + <TableCell>{item.name}</TableCell> + <TableCell>{item.email}</TableCell> + <TableCell>{formatBoolean(item, 'administrator')}</TableCell> + <TableCell>{formatBoolean(item, 'disabled')}</TableCell> </TableRow> ))} </TableBody> @@ -62,13 +59,11 @@ const UsersView = ({ updateTimestamp, onMenuClick }) => { } const UsersPage = () => { - const classes = useStyles(); - return ( - <div className={classes.root}> + <> <MainToolbar /> <EditCollectionView content={UsersView} editPath="/user" endpoint="users" /> - </div> + </> ); } |