{intl.formatMessage(messages.all)}
)}
>
{
groupIds.slice(0, 6).map(groupId => (
))
}
{
count > 6 &&
{intl.formatMessage(messages.show_all)}
}
)
}
}
const mapStateToProps2 = (state, { id }) => ({
group: state.getIn(['groups', id]),
relationships: state.getIn(['group_relationships', id]),
})
@connect(mapStateToProps2)
@injectIntl
class GroupPanelItem extends ImmutablePureComponent {
static propTypes = {
group: ImmutablePropTypes.map,
relationships: ImmutablePropTypes.map,
}
state = {
hovering: false,
}
handleOnMouseEnter = () => {
this.setState({ hovering: true })
}
handleOnMouseLeave = () => {
this.setState({ hovering: false })
}
render() {
const { intl, group, relationships } = this.props
const { hovering } = this.state
if (!relationships) return null
const unreadCount = relationships.get('unread_count')
const cx = classNames.bind(styles)
const titleClasses = cx({
default: 1,
text: 1,
displayFlex: 1,
colorBrand: 1,
fontSize14PX: 1,
fontWeightBold: 1,
lineHeight15: 1,
underline: hovering,
})
return (