1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-22 11:57:34 +00:00

Fix eslint warnings (#5635)

* 01 fix eslint warnings

* fix code warnings

* fix code warnings

* fix code warnings

* fix code warnings

* fix code warnings
This commit is contained in:
Michael An
2023-09-13 08:40:50 +08:00
committed by GitHub
parent d829ba5b23
commit 14ce391007
520 changed files with 4774 additions and 3438 deletions

View File

@@ -1,10 +1,10 @@
import React from 'react';
import PropTypes from 'prop-types';
import { Alert, Modal, ModalHeader, ModalBody, ModalFooter, Button, Form, FormGroup, Input, InputGroup, InputGroupAddon, InputGroupText } from 'reactstrap';
import { Modal, ModalHeader, ModalBody, ModalFooter, Button, Form, FormGroup, Input } from 'reactstrap';
import { gettext } from '../../../utils/constants';
import { Utils } from '../../../utils/utils';
const propTypes = {
name: PropTypes.string.isRequired,
toggle: PropTypes.func.isRequired,
updateName: PropTypes.func.isRequired
};
@@ -21,7 +21,7 @@ class SysAdminSetOrgNameDialog extends React.Component {
toggle = () => {
this.props.toggle();
}
};
handleInputChange = (e) => {
const value = e.target.value;
@@ -29,19 +29,19 @@ class SysAdminSetOrgNameDialog extends React.Component {
name: value,
isSubmitBtnActive: value.trim() != ''
});
}
};
handleKeyPress = (e) => {
if (e.key == 'Enter') {
this.handleSubmit();
e.preventDefault();
}
}
};
handleSubmit = () => {
this.props.updateName(this.state.name.trim());
this.toggle();
}
};
render() {
const { name, isSubmitBtnActive } = this.state;