Parcourir la source

change to SFC

itizawa il y a 6 ans
Parent
commit
8f49500606
1 fichiers modifiés avec 8 ajouts et 12 suppressions
  1. 8 12
      src/client/js/components/Admin/Common/AdminUpdateButtonRow.jsx

+ 8 - 12
src/client/js/components/Admin/Common/AdminUpdateButtonRow.jsx

@@ -2,21 +2,17 @@ import React from 'react';
 import PropTypes from 'prop-types';
 import PropTypes from 'prop-types';
 import { withTranslation } from 'react-i18next';
 import { withTranslation } from 'react-i18next';
 
 
-class AdminUpdateButtonRow extends React.PureComponent {
+const AdminUpdateButtonRow = (props) => {
+  const { t } = props;
 
 
-  render() {
-    const { t } = this.props;
-
-    return (
-      <div className="row my-3">
-          <button type="button" className="btn btn-primary" onClick={this.props.onClick} disabled={this.props.disabled}>{ t('Update') }</button>
-        </div>
+  return (
+    <div className="row my-3">
       <div className="offset-4 col-5">
       <div className="offset-4 col-5">
+        <button type="button" className="btn btn-primary" onClick={props.onClick} disabled={props.disabled}>{ t('Update') }</button>
       </div>
       </div>
-    );
-  }
-
-}
+    </div>
+  );
+};
 
 
 AdminUpdateButtonRow.propTypes = {
 AdminUpdateButtonRow.propTypes = {
   t: PropTypes.func.isRequired, // i18next
   t: PropTypes.func.isRequired, // i18next