Yuki Takei 7 лет назад
Родитель
Сommit
3a05dc821e

+ 2 - 1
packages/growi-plugin-lsx/src/resource/js/components/PageList/Page.js

@@ -1,8 +1,9 @@
 import React from 'react';
 import PropTypes from 'prop-types';
 
+import PageListMeta from '@client/js/components/PageList/PageListMeta';
+
 import { LsxContext } from '../../util/LsxContext';
-import { PageListMeta } from './PageListMeta';
 import { PagePath } from './PagePath';
 import { PageNode } from '../PageNode';
 

+ 0 - 52
packages/growi-plugin-lsx/src/resource/js/components/PageList/PageListMeta.js

@@ -1,52 +0,0 @@
-import React from 'react';
-import PropTypes from 'prop-types';
-
-export class PageListMeta extends React.Component {
-
-  isPortalPath(path) {
-    if (path.match(/.*\/$/)) {
-      return true;
-    }
-
-    return false;
-  }
-
-  render() {
-    // TODO isPortal()
-    const page = this.props.page;
-
-    // portal check
-    let PortalLabel;
-    if (this.isPortalPath(page.path)) {
-      PortalLabel = <span className="label label-info">PORTAL</span>;
-    }
-
-    let CommentCount;
-    if (page.commentCount > 0) {
-      CommentCount = <span><i className="icon-bubble" />{page.commentCount}</span>;
-    }
-
-    let LikerCount;
-    if (page.liker.length > 0) {
-      LikerCount = <span><i className="icon-like" />{page.liker.length}</span>;
-    }
-
-
-    return (
-      <span className="page-list-meta">
-        {PortalLabel}
-        {CommentCount}
-        {LikerCount}
-      </span>
-    );
-  }
-}
-
-PageListMeta.propTypes = {
-  page: PropTypes.object.isRequired,
-};
-
-PageListMeta.defaultProps = {
-  page: {},
-};
-