Просмотр исходного кода

deleted isEnabled state, and initialized pages state to [].

白石誠 5 лет назад
Родитель
Сommit
f936944b3a
1 измененных файлов с 1 добавлено и 13 удалено
  1. 1 13
      src/client/js/components/PageTimeline.jsx

+ 1 - 13
src/client/js/components/PageTimeline.jsx

@@ -14,14 +14,9 @@ class PageTimeline extends React.Component {
 
   constructor(props) {
     super(props);
-
-    const { appContainer } = this.props;
     this.showPages = this.showPages.bind(this);
     this.state = {
-      isEnabled: appContainer.getConfig().isEnabledTimeline,
-
-      // TODO: remove after when timeline is implemented with React and inject data with props
-      pages: this.props.pages,
+      pages: [],
     };
 
   }
@@ -36,9 +31,6 @@ class PageTimeline extends React.Component {
   }
 
   componentWillMount() {
-    if (!this.state.isEnabled) {
-      return;
-    }
     const { appContainer } = this.props;
 
     // initialize GrowiRenderer
@@ -47,10 +39,6 @@ class PageTimeline extends React.Component {
   }
 
   render() {
-    if (!this.state.isEnabled) {
-      return <React.Fragment></React.Fragment>;
-    }
-
     const { pages } = this.state;
 
     if (pages == null) {