Updated GroupCollectionTimeline

• Updated:
- GroupCollectionTimeline
This commit is contained in:
mgabdev 2020-08-07 18:18:56 -05:00
parent 8c985def86
commit d3aa5ddf4b

@ -28,15 +28,15 @@ const messages = defineMessages({
const mapStateToProps = (state) => { const mapStateToProps = (state) => {
let dontShowGroupSort = true let hasNoGroupMembers = true
try { try {
dontShowGroupSort = state.getIn(['group_lists', 'member', 'items'], ImmutableList()).count() === 0 hasNoGroupMembers = state.getIn(['group_lists', 'member', 'items'], ImmutableList()).count() === 0
} catch (error) { } catch (error) {
// //
} }
return { return {
dontShowGroupSort, hasNoGroupMembers,
sortByValue: state.getIn(['group_lists', 'sortByValue']), sortByValue: state.getIn(['group_lists', 'sortByValue']),
sortByTopValue: state.getIn(['group_lists', 'sortByTopValue']), sortByTopValue: state.getIn(['group_lists', 'sortByTopValue']),
} }
@ -159,10 +159,10 @@ class GroupCollectionTimeline extends PureComponent {
const { const {
collectionType, collectionType,
intl, intl,
dontShowGroupSort, hasNoGroupMembers,
} = this.props } = this.props
const emptyMessage = !!me && collectionType === 'member' && dontShowGroupSort ? ( const emptyMessage = !!me && collectionType === 'member' && hasNoGroupMembers ? (
<div className={[_s.default, _s.width100PC]}> <div className={[_s.default, _s.width100PC]}>
<Text className={[_s.default, _s.mb10].join(' ')}> <Text className={[_s.default, _s.mb10].join(' ')}>
Join some groups then come back here to view your group timeline Join some groups then come back here to view your group timeline
@ -173,10 +173,7 @@ class GroupCollectionTimeline extends PureComponent {
return ( return (
<Fragment> <Fragment>
{ <GroupSortBlock collectionType={collectionType} />
!dontShowGroupSort && collectionType !== 'member' &&
<GroupSortBlock collectionType={collectionType} />
}
<StatusList <StatusList
scrollKey={`group-collection-timeline-${collectionType}`} scrollKey={`group-collection-timeline-${collectionType}`}
timelineId={`group_collection:${collectionType}`} timelineId={`group_collection:${collectionType}`}