Skip to content

Commit

Permalink
change no-alert to error and remove unused alert
Browse files Browse the repository at this point in the history
  • Loading branch information
AaronPersaud committed Oct 16, 2023
1 parent 896e50b commit dd0435d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ module.exports = {
'react/react-in-jsx-scope': 'off',
'import/no-duplicates': 'off',
'import/no-named-as-default': 'off',
'no-alert': 'off',
'no-alert': 'error',
'no-console': 'error',
},
overrides: [
Expand Down
7 changes: 1 addition & 6 deletions src/components/ForcePasswordUpdate/ForcePasswordUpdate.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -49,15 +49,10 @@ export class ForcePasswordUpdate extends Form {
};

doSubmit = async () => {
const { newpassword, confirmnewpassword } = {
const { newpassword } = {
...this.state.data,
};

if (newpassword !== confirmnewpassword) {
alert('Confirm Password must match New Password');
return;
}

const { userId } = this.props.match.params;
const data = { userId, newpassword };
const status = await this.props.forcePasswordUpdate(data);
Expand Down

0 comments on commit dd0435d

Please sign in to comment.