From de1757bf57d3c1daf7bfa3cd6285e97ceea3a2de Mon Sep 17 00:00:00 2001 From: Your Name Date: Wed, 2 Nov 2022 12:44:44 +1100 Subject: [PATCH] Deleted unused failRegexEvent --- jsx/src/components/AddUser/AddUser.jsx | 3 +-- jsx/src/components/AddUser/AddUser.test.js | 1 - jsx/src/components/CreateGroup/CreateGroup.jsx | 1 - jsx/src/components/EditUser/EditUser.jsx | 1 - jsx/src/components/EditUser/EditUser.test.js | 1 - jsx/src/util/withAPI.js | 5 +---- 6 files changed, 2 insertions(+), 10 deletions(-) diff --git a/jsx/src/components/AddUser/AddUser.jsx b/jsx/src/components/AddUser/AddUser.jsx index 3826ad2c..dcc0b9ef 100644 --- a/jsx/src/components/AddUser/AddUser.jsx +++ b/jsx/src/components/AddUser/AddUser.jsx @@ -21,7 +21,7 @@ const AddUser = (props) => { }); }; - var { addUsers, failRegexEvent, updateUsers, history } = props; + var { addUsers, updateUsers, history } = props; return ( <> @@ -122,7 +122,6 @@ const AddUser = (props) => { AddUser.propTypes = { addUsers: PropTypes.func, - failRegexEvent: PropTypes.func, updateUsers: PropTypes.func, history: PropTypes.shape({ push: PropTypes.func, diff --git a/jsx/src/components/AddUser/AddUser.test.js b/jsx/src/components/AddUser/AddUser.test.js index e3965f15..fb9c3ac2 100644 --- a/jsx/src/components/AddUser/AddUser.test.js +++ b/jsx/src/components/AddUser/AddUser.test.js @@ -28,7 +28,6 @@ var addUserJsx = (spy, spy2, spy3) => ( {} }} /> diff --git a/jsx/src/components/CreateGroup/CreateGroup.jsx b/jsx/src/components/CreateGroup/CreateGroup.jsx index 66b8b9d8..576ea796 100644 --- a/jsx/src/components/CreateGroup/CreateGroup.jsx +++ b/jsx/src/components/CreateGroup/CreateGroup.jsx @@ -108,7 +108,6 @@ const CreateGroup = (props) => { CreateGroup.propTypes = { createGroup: PropTypes.func, updateGroups: PropTypes.func, - failRegexEvent: PropTypes.func, history: PropTypes.shape({ push: PropTypes.func, }), diff --git a/jsx/src/components/EditUser/EditUser.jsx b/jsx/src/components/EditUser/EditUser.jsx index 211b9c46..9d47a9fa 100644 --- a/jsx/src/components/EditUser/EditUser.jsx +++ b/jsx/src/components/EditUser/EditUser.jsx @@ -170,7 +170,6 @@ EditUser.propTypes = { }), editUser: PropTypes.func, deleteUser: PropTypes.func, - failRegexEvent: PropTypes.func, noChangeEvent: PropTypes.func, updateUsers: PropTypes.func, }; diff --git a/jsx/src/components/EditUser/EditUser.test.js b/jsx/src/components/EditUser/EditUser.test.js index cff36387..920b9e16 100644 --- a/jsx/src/components/EditUser/EditUser.test.js +++ b/jsx/src/components/EditUser/EditUser.test.js @@ -31,7 +31,6 @@ var editUserJsx = (callbackSpy, empty) => ( editUser={callbackSpy} updateUsers={callbackSpy} history={{ push: () => {} }} - failRegexEvent={callbackSpy} noChangeEvent={callbackSpy} /> diff --git a/jsx/src/util/withAPI.js b/jsx/src/util/withAPI.js index 198d3387..6fa1307b 100644 --- a/jsx/src/util/withAPI.js +++ b/jsx/src/util/withAPI.js @@ -41,10 +41,7 @@ const withAPI = withProps(() => ({ jhapiRequest("/users/" + username, "GET") .then((data) => data.status) .then((data) => (data > 200 ? false : true)), - // Temporarily Unused - failRegexEvent: () => { - return null; - }, + noChangeEvent: () => { return null; },