import React, {Component, PropTypes} from 'react'; import t from 'coral-framework/services/i18n'; import styles from './IgnoredUsers.css'; export class IgnoredUsers extends Component { static propTypes = { users: PropTypes.arrayOf(PropTypes.shape({ username: PropTypes.string, id: PropTypes.string, })).isRequired, // accepts { id } stopIgnoring: PropTypes.func.isRequired, } render() { const {users, stopIgnoring} = this.props; return (
{ users.length ?

{t('framework.because_you_ignored')}

: null }
{ users.map(({username, id}) => (
{ username }
stopIgnoring({id})} className={styles.link}>{t('framework.stop_ignoring')}
)) }
); } } export default IgnoredUsers;