zahmis 5 лет назад
Родитель
Сommit
0ed6d857e3
1 измененных файлов с 8 добавлено и 4 удалено
  1. 8 4
      src/client/js/components/PageTimeline.jsx

+ 8 - 4
src/client/js/components/PageTimeline.jsx

@@ -25,6 +25,10 @@ class PageTimeline extends React.Component {
       // TODO: remove after when timeline is implemented with React and inject data with props
       pages: this.props.pages,
     };
+    console.log('constructor');
+    console.log(this.state.activePage);
+    console.log(this.state.totalPageItems);
+    console.log(this.state.limit);
 
     this.handlePage = this.handlePage.bind(this);
   }
@@ -47,10 +51,6 @@ class PageTimeline extends React.Component {
     });
   }
 
-  async componentDidMount() {
-    await this.handlePage(1);
-  }
-
   async componentWillMount() {
     const { appContainer } = this.props;
     // initialize GrowiRenderer
@@ -58,6 +58,10 @@ class PageTimeline extends React.Component {
     await this.handlePage(1);
   }
 
+  async componentDidMount() {
+    await this.handlePage(1);
+  }
+
   render() {
     const { pages } = this.state;