Refactor initial state: "me" (#5563)
* Refactor initial state: "me" * remove "me" from reducers/meta.js
This commit is contained in:
parent
29609fbb6a
commit
b254e6ca5f
24 changed files with 44 additions and 60 deletions
|
@ -4,6 +4,7 @@ import PropTypes from 'prop-types';
|
|||
import DropdownMenuContainer from '../../../containers/dropdown_menu_container';
|
||||
import { Link } from 'react-router-dom';
|
||||
import { defineMessages, injectIntl, FormattedMessage, FormattedNumber } from 'react-intl';
|
||||
import { me } from '../../../initial_state';
|
||||
|
||||
const messages = defineMessages({
|
||||
mention: { id: 'account.mention', defaultMessage: 'Mention @{name}' },
|
||||
|
@ -26,7 +27,6 @@ export default class ActionBar extends React.PureComponent {
|
|||
|
||||
static propTypes = {
|
||||
account: ImmutablePropTypes.map.isRequired,
|
||||
me: PropTypes.string.isRequired,
|
||||
onFollow: PropTypes.func,
|
||||
onBlock: PropTypes.func.isRequired,
|
||||
onMention: PropTypes.func.isRequired,
|
||||
|
@ -44,7 +44,7 @@ export default class ActionBar extends React.PureComponent {
|
|||
}
|
||||
|
||||
render () {
|
||||
const { account, me, intl } = this.props;
|
||||
const { account, intl } = this.props;
|
||||
|
||||
let menu = [];
|
||||
let extraInfo = '';
|
||||
|
|
|
@ -6,7 +6,7 @@ import IconButton from '../../../components/icon_button';
|
|||
import Motion from '../../ui/util/optional_motion';
|
||||
import spring from 'react-motion/lib/spring';
|
||||
import ImmutablePureComponent from 'react-immutable-pure-component';
|
||||
import { autoPlayGif } from '../../../initial_state';
|
||||
import { autoPlayGif, me } from '../../../initial_state';
|
||||
|
||||
const messages = defineMessages({
|
||||
unfollow: { id: 'account.unfollow', defaultMessage: 'Unfollow' },
|
||||
|
@ -67,13 +67,12 @@ export default class Header extends ImmutablePureComponent {
|
|||
|
||||
static propTypes = {
|
||||
account: ImmutablePropTypes.map,
|
||||
me: PropTypes.string.isRequired,
|
||||
onFollow: PropTypes.func.isRequired,
|
||||
intl: PropTypes.object.isRequired,
|
||||
};
|
||||
|
||||
render () {
|
||||
const { account, me, intl } = this.props;
|
||||
const { account, intl } = this.props;
|
||||
|
||||
if (!account) {
|
||||
return null;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue