aboutsummaryrefslogtreecommitdiff
path: root/modern/src/admin/UsersPage.js
diff options
context:
space:
mode:
authorDesmond Kyeremeh <elDekyfin@gmail.com>2021-07-11 22:14:39 +0000
committerDesmond Kyeremeh <elDekyfin@gmail.com>2021-07-11 22:14:39 +0000
commit1b93de84e2bf6a6532bdb03e1ae75e47061a4dca (patch)
tree8989ce8c6c5bb1d2a748ffe91895fe929c99dd5e /modern/src/admin/UsersPage.js
parentefe18c504a834760242937572b369530c552e589 (diff)
downloadtrackermap-web-1b93de84e2bf6a6532bdb03e1ae75e47061a4dca.tar.gz
trackermap-web-1b93de84e2bf6a6532bdb03e1ae75e47061a4dca.tar.bz2
trackermap-web-1b93de84e2bf6a6532bdb03e1ae75e47061a4dca.zip
Fixed linting
Diffstat (limited to 'modern/src/admin/UsersPage.js')
-rw-r--r--modern/src/admin/UsersPage.js82
1 files changed, 41 insertions, 41 deletions
diff --git a/modern/src/admin/UsersPage.js b/modern/src/admin/UsersPage.js
index ceaab6ab..6afe099e 100644
--- a/modern/src/admin/UsersPage.js
+++ b/modern/src/admin/UsersPage.js
@@ -1,5 +1,7 @@
import React, { useState } from 'react';
-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 t from '../common/localization';
import { useEffectAsync } from '../reactHelper';
@@ -7,11 +9,11 @@ import EditCollectionView from '../EditCollectionView';
import { formatBoolean } from '../common/formatter';
import OptionsLayout from '../settings/OptionsLayout';
-const useStyles = makeStyles(theme => ({
+const useStyles = makeStyles((theme) => ({
columnAction: {
width: theme.spacing(1),
- padding: theme.spacing(0, 1)
- }
+ padding: theme.spacing(0, 1),
+ },
}));
const UsersView = ({ updateTimestamp, onMenuClick }) => {
@@ -28,48 +30,46 @@ 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">
+ <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)}
+ 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>
+ <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 (
- <OptionsLayout>
- <EditCollectionView
- content={UsersView}
- editPath="/user"
- endpoint="users"
- />
- </OptionsLayout>
- );
-};
+const UsersPage = () => (
+ <OptionsLayout>
+ <EditCollectionView
+ content={UsersView}
+ editPath="/user"
+ endpoint="users"
+ />
+ </OptionsLayout>
+);
export default UsersPage;