itizawa 6 лет назад
Родитель
Сommit
3c75e4b3e2
1 измененных файлов с 6 добавлено и 3 удалено
  1. 6 3
      src/client/js/components/Me/PasswordSettings.jsx

+ 6 - 3
src/client/js/components/Me/PasswordSettings.jsx

@@ -4,7 +4,7 @@ import PropTypes from 'prop-types';
 import { withTranslation } from 'react-i18next';
 import { withTranslation } from 'react-i18next';
 
 
 
 
-import { toastError } from '../../util/apiNotification';
+import { toastSuccess, toastError } from '../../util/apiNotification';
 import { createSubscribedElement } from '../UnstatedUtils';
 import { createSubscribedElement } from '../UnstatedUtils';
 
 
 import AppContainer from '../../services/AppContainer';
 import AppContainer from '../../services/AppContainer';
@@ -16,6 +16,8 @@ class PasswordSettings extends React.Component {
   constructor(appContainer) {
   constructor(appContainer) {
     super();
     super();
 
 
+    this.appContainer = appContainer;
+
     this.state = {
     this.state = {
       oldPassword: '',
       oldPassword: '',
       newPassword: '',
       newPassword: '',
@@ -27,11 +29,12 @@ class PasswordSettings extends React.Component {
   }
   }
 
 
   async onClickSubmit() {
   async onClickSubmit() {
+    const { t } = this.props;
 
 
     try {
     try {
       // await personalContainer.updateBasicInfo();
       // await personalContainer.updateBasicInfo();
-      // TODO
-      // toastSuccess(t('toaster.update_successed', { target: t('Basic Info') }));
+      console.log(this.state);
+      toastSuccess(t('toaster.update_successed', { target: t('personal_settings.update_password') }));
     }
     }
     catch (err) {
     catch (err) {
       toastError(err);
       toastError(err);