Procházet zdrojové kódy

delete handlechange in componentWillMount

zahmis před 5 roky
rodič
revize
0763a4b61f
1 změnil soubory, kde provedl 4 přidání a 3 odebrání
  1. 4 3
      src/client/js/components/PageTimeline.jsx

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

@@ -47,20 +47,21 @@ class PageTimeline extends React.Component {
     });
   }
 
-  async componentWillMount() {
+  componentWillMount() {
     const { appContainer } = this.props;
     // initialize GrowiRenderer
     this.growiRenderer = appContainer.getRenderer('timeline');
-    await this.handlePage(1);
   }
 
   async componentDidMount() {
     await this.handlePage(1);
+    this.setState({
+      activePage: 1,
+    });
   }
 
   render() {
     const { pages } = this.state;
-
     if (pages == null) {
       return <React.Fragment></React.Fragment>;
     }