import React, { Fragment } from 'react'; import PropTypes from 'prop-types'; import { withTranslation } from 'react-i18next'; import UserPicture from '../../User/UserPicture'; import PageListMeta from '../../PageList/PageListMeta'; import { createSubscribedElement } from '../../UnstatedUtils'; import AppContainer from '../../../services/AppContainer'; class UserGroupPageList extends React.Component { constructor(props) { super(props); this.renderPageList = this.renderPageList.bind(this); } renderPageList(page) { return (
  • {decodeURIComponent(page.path)}
  • ); } render() { const { t } = this.props; return ( { t('Page') }
    {this.props.relatedPages.length === 0 ?

    { t('user_group_management.no_pages') }

    : null}
    ); } } UserGroupPageList.propTypes = { t: PropTypes.func.isRequired, // i18next relatedPages: PropTypes.arrayOf(PropTypes.object).isRequired, }; /** * Wrapper component for using unstated */ const UserGroupPageListWrapper = (props) => { return createSubscribedElement(UserGroupPageList, props, [AppContainer]); }; export default withTranslation()(UserGroupPageListWrapper);