Browse Source

Merge branch 'fix/password-reset-error' into 'chapo-dev'

Fix password reset error this binding

See merge request chapo-sandbox/lemmy!355
unoptim
GreatBearShark M 2 years ago
parent
commit
c337d8a8b2
  1. 2
      package.json
  2. 8
      src/components/password_change.tsx

2
package.json

@ -6,7 +6,7 @@
"license": "AGPL-3.0-or-later",
"scripts": {
"api-test": "jest src/api_tests/api.spec.ts",
"build": "node generate_translations.js && node generate_git_verison.js && tsc --noEmit && NODE_ENV=production vite build --base=/static/",
"build": "node generate_translations.js && node generate_git_verison.js && tsc --noEmit && NODE_ENV=production vite build --base=/static/ --sourcemap",
"lint": "tsc --noEmit && eslint --report-unused-disable-directives --ext .js,.ts,.tsx src",
"start": "node generate_translations.js && vite --port 4444 --open",
"storybook": "start-storybook -p 9009",

8
src/components/password_change.tsx

@ -64,7 +64,7 @@ export class PasswordChange extends Component<any, State> {
passwordChangeForm() {
return (
<form onSubmit={linkEvent(this, this.handlePasswordChangeSubmit)}>
<form onSubmit={this.handlePasswordChangeSubmit}>
<div className="form-group row">
<label className="col-sm-2 col-form-label">
{i18n.t('new_password')}
@ -120,12 +120,12 @@ export class PasswordChange extends Component<any, State> {
i.setState(i.state);
}
handlePasswordChangeSubmit(i: PasswordChange, event: any) {
handlePasswordChangeSubmit = (event: any) => {
event.preventDefault();
this.setState({ loading: true });
WebSocketService.Instance.passwordChange(i.state.passwordChangeForm);
}
WebSocketService.Instance.passwordChange(this.state.passwordChangeForm);
};
parseMessage(msg: WebSocketJsonResponse) {
console.log(msg);

Loading…
Cancel
Save