|
|
@@ -18,6 +18,8 @@ export default class Page extends React.Component {
|
|
|
flex: 1,
|
|
|
};
|
|
|
|
|
|
+ const hasChildren = this.props.children != null;
|
|
|
+
|
|
|
return (
|
|
|
<li className="page-list-li d-flex align-items-center">
|
|
|
<UserPicture user={page.lastUpdateUser} />
|
|
|
@@ -25,7 +27,12 @@ export default class Page extends React.Component {
|
|
|
<PagePath page={page} excludePathString={this.props.excludePathString} />
|
|
|
</a>
|
|
|
<PageListMeta page={page} />
|
|
|
- <div style={styleFlex}></div>
|
|
|
+ { hasChildren && (
|
|
|
+ <React.Fragment>
|
|
|
+ <a style={styleFlex} href={link}> </a>
|
|
|
+ {this.props.children}
|
|
|
+ </React.Fragment>
|
|
|
+ ) }
|
|
|
</li>
|
|
|
);
|
|
|
}
|
|
|
@@ -36,6 +43,7 @@ Page.propTypes = {
|
|
|
page: PropTypes.object.isRequired,
|
|
|
linkTo: PropTypes.string,
|
|
|
excludePathString: PropTypes.string,
|
|
|
+ children: PropTypes.array,
|
|
|
};
|
|
|
|
|
|
Page.defaultProps = {
|