mirror of
https://github.com/lunaisnotaboy/mastodon.git
synced 2024-11-07 23:44:33 +00:00
use makeMapStateToProps
This commit is contained in:
parent
e4ebbf4f07
commit
be50e45a74
|
@ -32,6 +32,7 @@ const messages = defineMessages({
|
||||||
misc: { id: 'navigation_bar.misc', defaultMessage: 'Misc' },
|
misc: { id: 'navigation_bar.misc', defaultMessage: 'Misc' },
|
||||||
});
|
});
|
||||||
|
|
||||||
|
const makeMapStateToProps = () => {
|
||||||
const getOrderedLists = createSelector([state => state.get('lists')], lists => {
|
const getOrderedLists = createSelector([state => state.get('lists')], lists => {
|
||||||
if (!lists) {
|
if (!lists) {
|
||||||
return lists;
|
return lists;
|
||||||
|
@ -41,13 +42,16 @@ const getOrderedLists = createSelector([state => state.get('lists')], lists => {
|
||||||
});
|
});
|
||||||
|
|
||||||
const mapStateToProps = state => ({
|
const mapStateToProps = state => ({
|
||||||
|
lists: getOrderedLists(state),
|
||||||
myAccount: state.getIn(['accounts', me]),
|
myAccount: state.getIn(['accounts', me]),
|
||||||
columns: state.getIn(['settings', 'columns']),
|
columns: state.getIn(['settings', 'columns']),
|
||||||
lists: getOrderedLists(state),
|
|
||||||
});
|
});
|
||||||
|
|
||||||
@connect(mapStateToProps)
|
return mapStateToProps;
|
||||||
|
}
|
||||||
|
|
||||||
@injectIntl
|
@injectIntl
|
||||||
|
@connect(makeMapStateToProps)
|
||||||
export default class GettingStarted extends ImmutablePureComponent {
|
export default class GettingStarted extends ImmutablePureComponent {
|
||||||
|
|
||||||
static propTypes = {
|
static propTypes = {
|
||||||
|
|
Loading…
Reference in a new issue