From e8ff4c8e56650bf061c63a7da3d84b742e618b6a Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Sun, 30 Oct 2016 15:06:43 +0100 Subject: Refactoring redux state into different reducers --- app/assets/javascripts/components/features/status/index.jsx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'app/assets/javascripts/components/features/status') diff --git a/app/assets/javascripts/components/features/status/index.jsx b/app/assets/javascripts/components/features/status/index.jsx index dc29a87c7..78498039c 100644 --- a/app/assets/javascripts/components/features/status/index.jsx +++ b/app/assets/javascripts/components/features/status/index.jsx @@ -31,7 +31,7 @@ const makeMapStateToProps = () => { status: getStatus(state, Number(props.params.statusId)), ancestorsIds: state.getIn(['timelines', 'ancestors', Number(props.params.statusId)]), descendantsIds: state.getIn(['timelines', 'descendants', Number(props.params.statusId)]), - me: state.getIn(['timelines', 'me']) + me: state.getIn(['meta', 'me']) }); return mapStateToProps; @@ -43,8 +43,8 @@ const Status = React.createClass({ params: React.PropTypes.object.isRequired, dispatch: React.PropTypes.func.isRequired, status: ImmutablePropTypes.map, - ancestorsIds: ImmutablePropTypes.orderedSet, - descendantsIds: ImmutablePropTypes.orderedSet + ancestorsIds: ImmutablePropTypes.list, + descendantsIds: ImmutablePropTypes.list }, mixins: [PureRenderMixin], @@ -101,11 +101,11 @@ const Status = React.createClass({ const account = status.get('account'); - if (ancestorsIds) { + if (ancestorsIds && ancestorsIds.size > 0) { ancestors =
{this.renderChildren(ancestorsIds)}
; } - if (descendantsIds) { + if (descendantsIds && descendantsIds.size > 0) { descendants =
{this.renderChildren(descendantsIds)}
; } -- cgit