itizawa 6 лет назад
Родитель
Сommit
c7b5c0338d
1 измененных файлов с 10 добавлено и 2 удалено
  1. 10 2
      src/client/js/components/Admin/Users/StatusActivateButton.jsx

+ 10 - 2
src/client/js/components/Admin/Users/StatusActivateButton.jsx

@@ -5,6 +5,7 @@ import { withTranslation } from 'react-i18next';
 import { createSubscribedElement } from '../../UnstatedUtils';
 import { createSubscribedElement } from '../../UnstatedUtils';
 import AppContainer from '../../../services/AppContainer';
 import AppContainer from '../../../services/AppContainer';
 import AdminUsersContainer from '../../../services/AdminUsersContainer';
 import AdminUsersContainer from '../../../services/AdminUsersContainer';
+import { toastSuccess, toastError } from '../../../util/apiNotification';
 
 
 class StatusActivateButton extends React.Component {
 class StatusActivateButton extends React.Component {
 
 
@@ -18,8 +19,15 @@ class StatusActivateButton extends React.Component {
     this.onClickAcceptBtn = this.onClickAcceptBtn.bind(this);
     this.onClickAcceptBtn = this.onClickAcceptBtn.bind(this);
   }
   }
 
 
-  onClickAcceptBtn() {
-    console.log('hello');
+  async onClickAcceptBtn() {
+    try {
+      // const username = await this.props.adminUsersContainer.removeUser(this.props.user._id);
+      const username = 'gest';
+      toastSuccess(`Accept ${username} success`);
+    }
+    catch (err) {
+      toastError(err);
+    }
   }
   }
 
 
   render() {
   render() {