aboutsummaryrefslogtreecommitdiff
path: root/modern/src/settings/GroupPage.js
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2021-07-10 15:24:10 -0700
committerAnton Tananaev <anton.tananaev@gmail.com>2021-07-10 15:24:10 -0700
commit0512964d71a25c172735f2149ef60c3a8b20f683 (patch)
treef47b42326a7e6a0eaa2715ca8066cb3ca7e7bb90 /modern/src/settings/GroupPage.js
parent627cf95d59f625dcb0544bfd4c067d99dee4bb93 (diff)
downloadtrackermap-web-0512964d71a25c172735f2149ef60c3a8b20f683.tar.gz
trackermap-web-0512964d71a25c172735f2149ef60c3a8b20f683.tar.bz2
trackermap-web-0512964d71a25c172735f2149ef60c3a8b20f683.zip
Use modified airbnb eslint
Diffstat (limited to 'modern/src/settings/GroupPage.js')
-rw-r--r--modern/src/settings/GroupPage.js27
1 files changed, 16 insertions, 11 deletions
diff --git a/modern/src/settings/GroupPage.js b/modern/src/settings/GroupPage.js
index b9fa8716..f9af0f8b 100644
--- a/modern/src/settings/GroupPage.js
+++ b/modern/src/settings/GroupPage.js
@@ -1,10 +1,12 @@
import React, { useState } from 'react';
import TextField from '@material-ui/core/TextField';
+import {
+ Accordion, AccordionSummary, AccordionDetails, makeStyles, Typography,
+} from '@material-ui/core';
+import ExpandMoreIcon from '@material-ui/icons/ExpandMore';
import t from '../common/localization';
import EditItemView from '../EditItemView';
-import { Accordion, AccordionSummary, AccordionDetails, makeStyles, Typography } from '@material-ui/core';
-import ExpandMoreIcon from '@material-ui/icons/ExpandMore';
import EditAttributesView from '../attributes/EditAttributesView';
import deviceAttributes from '../attributes/deviceAttributes';
import SelectField from '../form/SelectField';
@@ -22,7 +24,8 @@ const GroupPage = () => {
return (
<EditItemView endpoint="groups" item={item} setItem={setItem}>
- {item &&
+ {item
+ && (
<>
<Accordion defaultExpanded>
<AccordionSummary expandIcon={<ExpandMoreIcon />}>
@@ -34,9 +37,10 @@ const GroupPage = () => {
<TextField
margin="normal"
value={item.name || ''}
- onChange={event => setItem({...item, name: event.target.value})}
+ onChange={(event) => setItem({ ...item, name: event.target.value })}
label={t('sharedName')}
- variant="filled" />
+ variant="filled"
+ />
</AccordionDetails>
</Accordion>
<Accordion>
@@ -49,10 +53,11 @@ const GroupPage = () => {
<SelectField
margin="normal"
value={item.groupId || 0}
- onChange={event => setItem({...item, groupId: Number(event.target.value)})}
+ onChange={(event) => setItem({ ...item, groupId: Number(event.target.value) })}
endpoint="/api/groups"
label={t('groupParent')}
- variant="filled" />
+ variant="filled"
+ />
</AccordionDetails>
</Accordion>
<Accordion>
@@ -64,15 +69,15 @@ const GroupPage = () => {
<AccordionDetails className={classes.details}>
<EditAttributesView
attributes={item.attributes}
- setAttributes={attributes => setItem({...item, attributes})}
+ setAttributes={(attributes) => setItem({ ...item, attributes })}
definitions={deviceAttributes}
- />
+ />
</AccordionDetails>
</Accordion>
</>
- }
+ )}
</EditItemView>
);
-}
+};
export default GroupPage;