Remove routerHistory parameters from composer actions (#31077)
This commit is contained in:
parent
adadfdbc03
commit
e768b23aa9
18 changed files with 91 additions and 100 deletions
|
@ -4,7 +4,6 @@ import { PureComponent } from 'react';
|
|||
import { defineMessages, injectIntl } from 'react-intl';
|
||||
|
||||
import classNames from 'classnames';
|
||||
import { withRouter } from 'react-router-dom';
|
||||
|
||||
import ImmutablePropTypes from 'react-immutable-proptypes';
|
||||
import { connect } from 'react-redux';
|
||||
|
@ -23,7 +22,6 @@ import RepeatPrivateIcon from '@/svg-icons/repeat_private.svg?react';
|
|||
import RepeatPrivateActiveIcon from '@/svg-icons/repeat_private_active.svg?react';
|
||||
import { identityContextPropShape, withIdentity } from 'mastodon/identity_context';
|
||||
import { PERMISSION_MANAGE_USERS, PERMISSION_MANAGE_FEDERATION } from 'mastodon/permissions';
|
||||
import { WithRouterPropTypes } from 'mastodon/utils/react_router';
|
||||
|
||||
import { IconButton } from '../../../components/icon_button';
|
||||
import DropdownMenuContainer from '../../../containers/dropdown_menu_container';
|
||||
|
@ -91,7 +89,6 @@ class ActionBar extends PureComponent {
|
|||
onPin: PropTypes.func,
|
||||
onEmbed: PropTypes.func,
|
||||
intl: PropTypes.object.isRequired,
|
||||
...WithRouterPropTypes,
|
||||
};
|
||||
|
||||
handleReplyClick = () => {
|
||||
|
@ -111,23 +108,23 @@ class ActionBar extends PureComponent {
|
|||
};
|
||||
|
||||
handleDeleteClick = () => {
|
||||
this.props.onDelete(this.props.status, this.props.history);
|
||||
this.props.onDelete(this.props.status);
|
||||
};
|
||||
|
||||
handleRedraftClick = () => {
|
||||
this.props.onDelete(this.props.status, this.props.history, true);
|
||||
this.props.onDelete(this.props.status, true);
|
||||
};
|
||||
|
||||
handleEditClick = () => {
|
||||
this.props.onEdit(this.props.status, this.props.history);
|
||||
this.props.onEdit(this.props.status);
|
||||
};
|
||||
|
||||
handleDirectClick = () => {
|
||||
this.props.onDirect(this.props.status.get('account'), this.props.history);
|
||||
this.props.onDirect(this.props.status.get('account'));
|
||||
};
|
||||
|
||||
handleMentionClick = () => {
|
||||
this.props.onMention(this.props.status.get('account'), this.props.history);
|
||||
this.props.onMention(this.props.status.get('account'));
|
||||
};
|
||||
|
||||
handleMuteClick = () => {
|
||||
|
@ -323,4 +320,4 @@ class ActionBar extends PureComponent {
|
|||
|
||||
}
|
||||
|
||||
export default withRouter(connect(mapStateToProps)(withIdentity(injectIntl(ActionBar))));
|
||||
export default connect(mapStateToProps)(withIdentity(injectIntl(ActionBar)));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue