Răsfoiți Sursa

add GrowiZipImportSection to Importer page

Yuki Takei 6 ani în urmă
părinte
comite
1f2ee8b2bc
2 a modificat fișierele cu 5 adăugiri și 16 ștergeri
  1. 0 14
      src/client/js/app.jsx
  2. 5 2
      src/client/js/components/Admin/Importer.jsx

+ 0 - 14
src/client/js/app.jsx

@@ -46,7 +46,6 @@ import Customize from './components/Admin/Customize/Customize';
 import Importer from './components/Admin/Importer';
 import FullTextSearchManagement from './components/Admin/FullTextSearchManagement/FullTextSearchPage';
 import ExportPage from './components/Admin/Export/ExportPage';
-import GrowiZipImportSection from './components/Admin/Import/GrowiZipImportSection';
 
 import AppContainer from './services/AppContainer';
 import PageContainer from './services/PageContainer';
@@ -234,19 +233,6 @@ if (adminExportPageElem != null) {
   );
 }
 
-// TODO: move to /imponents/Admin/Importer.jsx
-const growiImportElem = document.getElementById('growi-import');
-if (growiImportElem != null) {
-  ReactDOM.render(
-    <Provider inject={[]}>
-      <I18nextProvider i18n={i18n}>
-        <GrowiZipImportSection />
-      </I18nextProvider>
-    </Provider>,
-    growiImportElem,
-  );
-}
-
 // うわーもうー (commented by Crowi team -- 2018.03.23 Yuki Takei)
 $('a[data-toggle="tab"][href="#revision-history"]').on('show.bs.tab', () => {
   ReactDOM.render(

+ 5 - 2
src/client/js/components/Admin/Importer.jsx

@@ -3,10 +3,13 @@ import { withTranslation } from 'react-i18next';
 import PropTypes from 'prop-types';
 import loggerFactory from '@alias/logger';
 
-import AppContainer from '../../services/AppContainer';
 import { createSubscribedElement } from '../UnstatedUtils';
 import { toastSuccess, toastError } from '../../util/apiNotification';
 
+import AppContainer from '../../services/AppContainer';
+
+import GrowiZipImportSection from './Import/GrowiZipImportSection';
+
 const logger = loggerFactory('growi:importer');
 
 class Importer extends React.Component {
@@ -131,7 +134,7 @@ class Importer extends React.Component {
     const { t } = this.props;
     return (
       <Fragment>
-        <div className="alert alert-warning tbd">(TBD) Load GrowiZipImportForm</div>
+        <GrowiZipImportSection />
 
         <form
           className="form-horizontal"