0
0
Fork 0

Refactor initial state: "me" (#5563)

* Refactor initial state: "me"

* remove "me" from reducers/meta.js
This commit is contained in:
Nolan Lawson 2017-10-30 19:27:48 -07:00 committed by Yamagishi Kazutoshi
parent 29609fbb6a
commit b254e6ca5f
24 changed files with 44 additions and 60 deletions

View file

@ -16,7 +16,6 @@ const mapStateToProps = (state, props) => ({
statusIds: state.getIn(['timelines', `account:${props.params.accountId}`, 'items'], ImmutableList()),
isLoading: state.getIn(['timelines', `account:${props.params.accountId}`, 'isLoading']),
hasMore: !!state.getIn(['timelines', `account:${props.params.accountId}`, 'next']),
me: state.getIn(['meta', 'me']),
});
@connect(mapStateToProps)
@ -28,7 +27,6 @@ export default class AccountTimeline extends ImmutablePureComponent {
statusIds: ImmutablePropTypes.list,
isLoading: PropTypes.bool,
hasMore: PropTypes.bool,
me: PropTypes.string.isRequired,
};
componentWillMount () {
@ -50,7 +48,7 @@ export default class AccountTimeline extends ImmutablePureComponent {
}
render () {
const { statusIds, isLoading, hasMore, me } = this.props;
const { statusIds, isLoading, hasMore } = this.props;
if (!statusIds && isLoading) {
return (
@ -70,7 +68,6 @@ export default class AccountTimeline extends ImmutablePureComponent {
statusIds={statusIds}
isLoading={isLoading}
hasMore={hasMore}
me={me}
onScrollToBottom={this.handleScrollToBottom}
/>
</Column>