diff options
author | Eugen Rochko <eugen@zeonfederated.com> | 2016-10-27 21:59:56 +0200 |
---|---|---|
committer | Eugen Rochko <eugen@zeonfederated.com> | 2016-10-27 21:59:56 +0200 |
commit | 1c84d505c8cb926710d059725c5a2d966dd4736b (patch) | |
tree | c4ff6e08948a6432ce8f966c4ba8b5d7e11adb28 /app/assets/javascripts/components/features/account/index.jsx | |
parent | 909d0d5e88b046f8bb69c893c54944bb2aad12cf (diff) |
Adding following/followers lists to the UI
Diffstat (limited to 'app/assets/javascripts/components/features/account/index.jsx')
-rw-r--r-- | app/assets/javascripts/components/features/account/index.jsx | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/app/assets/javascripts/components/features/account/index.jsx b/app/assets/javascripts/components/features/account/index.jsx index 76d69f751..548f7fc1f 100644 --- a/app/assets/javascripts/components/features/account/index.jsx +++ b/app/assets/javascripts/components/features/account/index.jsx @@ -14,17 +14,23 @@ import { mentionCompose } from '../../actions/compose'; import Header from './components/header'; import { getAccountTimeline, - getAccount + makeGetAccount } from '../../selectors'; import LoadingIndicator from '../../components/loading_indicator'; import ActionBar from './components/action_bar'; import Column from '../ui/components/column'; import ColumnBackButton from '../../components/column_back_button'; -const mapStateToProps = (state, props) => ({ - account: getAccount(state, Number(props.params.accountId)), - me: state.getIn(['timelines', 'me']) -}); +const makeMapStateToProps = () => { + const getAccount = makeGetAccount(); + + const mapStateToProps = (state, props) => ({ + account: getAccount(state, Number(props.params.accountId)), + me: state.getIn(['timelines', 'me']) + }); + + return mapStateToProps; +}; const Account = React.createClass({ @@ -92,4 +98,4 @@ const Account = React.createClass({ }); -export default connect(mapStateToProps)(Account); +export default connect(makeMapStateToProps)(Account); |