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

@ -38,13 +38,13 @@ import {
PinnedStatuses,
} from './util/async-components';
import { HotKeys } from 'react-hotkeys';
import { me } from '../../initial_state';
// Dummy import, to make sure that <Status /> ends up in the application bundle.
// Without this it ends up in ~8 very commonly used bundles.
import '../../components/status';
const mapStateToProps = state => ({
me: state.getIn(['meta', 'me']),
isComposing: state.getIn(['compose', 'is_composing']),
});
@ -86,7 +86,6 @@ export default class UI extends React.Component {
dispatch: PropTypes.func.isRequired,
children: PropTypes.node,
isComposing: PropTypes.bool,
me: PropTypes.string,
location: PropTypes.object,
};
@ -305,7 +304,7 @@ export default class UI extends React.Component {
}
handleHotkeyGoToProfile = () => {
this.context.router.history.push(`/accounts/${this.props.me}`);
this.context.router.history.push(`/accounts/${me}`);
}
handleHotkeyGoToBlocked = () => {