aboutsummaryrefslogtreecommitdiff
path: root/modern/src/EditItemView.js
diff options
context:
space:
mode:
Diffstat (limited to 'modern/src/EditItemView.js')
-rw-r--r--modern/src/EditItemView.js16
1 files changed, 9 insertions, 7 deletions
diff --git a/modern/src/EditItemView.js b/modern/src/EditItemView.js
index bab56c7f..a77f578e 100644
--- a/modern/src/EditItemView.js
+++ b/modern/src/EditItemView.js
@@ -9,20 +9,22 @@ import t from './common/localization';
import { useEffectAsync } from './reactHelper';
import OptionsLayout from './settings/OptionsLayout';
-const useStyles = makeStyles(theme => ({
+const useStyles = makeStyles((theme) => ({
container: {
- marginTop: theme.spacing(2)
+ marginTop: theme.spacing(2),
},
buttons: {
display: 'flex',
justifyContent: 'space-evenly',
'& > *': {
- flexBasis: '33%'
- }
- }
+ flexBasis: '33%',
+ },
+ },
}));
-const EditItemView = ({ children, endpoint, item, setItem }) => {
+const EditItemView = ({
+ children, endpoint, item, setItem,
+}) => {
const history = useHistory();
const classes = useStyles();
const { id } = useParams();
@@ -47,7 +49,7 @@ const EditItemView = ({ children, endpoint, item, setItem }) => {
const response = await fetch(url, {
method: !id ? 'POST' : 'PUT',
headers: { 'Content-Type': 'application/json' },
- body: JSON.stringify(item)
+ body: JSON.stringify(item),
});
if (response.ok) {