Lint and make App (Component) functional

This commit is contained in:
Nathan Barber
2021-04-07 15:36:17 -04:00
parent 1d705193cb
commit cadcb686c9
9 changed files with 82 additions and 123 deletions

View File

@@ -15,7 +15,7 @@ const withUserAPI = withProps((props) => ({
"Cannot change username - either contains special characters or is too short."
),
noChangeEvent: () => {
returns
returns;
},
refreshUserData: () =>
jhapiRequest("/users", "GET")

View File

@@ -81,7 +81,7 @@ const EditUser = (props) => {
className="btn btn-primary"
onClick={() => {
if (updatedUsername == "" && admin == has_admin) {
noChangeEvent()
noChangeEvent();
return;
} else if (updatedUsername != "") {
if (
@@ -136,6 +136,7 @@ EditUser.propTypes = {
editUser: PropTypes.func,
deleteUser: PropTypes.func,
failRegexEvent: PropTypes.func,
noChangeEvent: PropTypes.func,
refreshUserData: PropTypes.func,
};