aboutsummaryrefslogtreecommitdiff
path: root/modern/src/admin/UsersPage.js
diff options
context:
space:
mode:
Diffstat (limited to 'modern/src/admin/UsersPage.js')
-rw-r--r--modern/src/admin/UsersPage.js74
1 files changed, 37 insertions, 37 deletions
diff --git a/modern/src/admin/UsersPage.js b/modern/src/admin/UsersPage.js
index 630bea43..fc6e6736 100644
--- a/modern/src/admin/UsersPage.js
+++ b/modern/src/admin/UsersPage.js
@@ -1,13 +1,15 @@
import React, { useState } from 'react';
-import MainToolbar from '../MainToolbar';
-import { TableContainer, Table, TableRow, TableCell, TableHead, TableBody, makeStyles, IconButton } from '@material-ui/core';
+import {
+ TableContainer, Table, TableRow, TableCell, TableHead, TableBody, makeStyles, IconButton,
+} from '@material-ui/core';
import MoreVertIcon from '@material-ui/icons/MoreVert';
+import MainToolbar from '../MainToolbar';
import t from '../common/localization';
import { useEffectAsync } from '../reactHelper';
import EditCollectionView from '../EditCollectionView';
import { formatBoolean } from '../common/formatter';
-const useStyles = makeStyles(theme => ({
+const useStyles = makeStyles((theme) => ({
columnAction: {
width: theme.spacing(1),
padding: theme.spacing(0, 1),
@@ -28,43 +30,41 @@ const UsersView = ({ updateTimestamp, onMenuClick }) => {
return (
<TableContainer>
- <Table>
- <TableHead>
- <TableRow>
- <TableCell className={classes.columnAction} />
- <TableCell>{t('sharedName')}</TableCell>
- <TableCell>{t('userEmail')}</TableCell>
- <TableCell>{t('userAdmin')}</TableCell>
- <TableCell>{t('sharedDisabled')}</TableCell>
- </TableRow>
- </TableHead>
- <TableBody>
- {items.map((item) => (
- <TableRow key={item.id}>
- <TableCell className={classes.columnAction} padding="none">
- <IconButton onClick={(event) => onMenuClick(event.currentTarget, item.id)}>
- <MoreVertIcon />
- </IconButton>
- </TableCell>
- <TableCell>{item.name}</TableCell>
- <TableCell>{item.email}</TableCell>
- <TableCell>{formatBoolean(item, 'administrator')}</TableCell>
- <TableCell>{formatBoolean(item, 'disabled')}</TableCell>
+ <Table>
+ <TableHead>
+ <TableRow>
+ <TableCell className={classes.columnAction} />
+ <TableCell>{t('sharedName')}</TableCell>
+ <TableCell>{t('userEmail')}</TableCell>
+ <TableCell>{t('userAdmin')}</TableCell>
+ <TableCell>{t('sharedDisabled')}</TableCell>
</TableRow>
- ))}
- </TableBody>
- </Table>
+ </TableHead>
+ <TableBody>
+ {items.map((item) => (
+ <TableRow key={item.id}>
+ <TableCell className={classes.columnAction} padding="none">
+ <IconButton onClick={(event) => onMenuClick(event.currentTarget, item.id)}>
+ <MoreVertIcon />
+ </IconButton>
+ </TableCell>
+ <TableCell>{item.name}</TableCell>
+ <TableCell>{item.email}</TableCell>
+ <TableCell>{formatBoolean(item, 'administrator')}</TableCell>
+ <TableCell>{formatBoolean(item, 'disabled')}</TableCell>
+ </TableRow>
+ ))}
+ </TableBody>
+ </Table>
</TableContainer>
);
-}
+};
-const UsersPage = () => {
- return (
- <>
- <MainToolbar />
- <EditCollectionView content={UsersView} editPath="/user" endpoint="users" />
- </>
- );
-}
+const UsersPage = () => (
+ <>
+ <MainToolbar />
+ <EditCollectionView content={UsersView} editPath="/user" endpoint="users" />
+ </>
+);
export default UsersPage;