Proposal: a modern & typed way of writing Redux actions doing API requests (#30270)
This commit is contained in:
parent
3a862439df
commit
10ec421dd4
14 changed files with 281 additions and 125 deletions
|
@ -123,7 +123,7 @@ class Footer extends ImmutablePureComponent {
|
|||
|
||||
_performReblog = (status, privacy) => {
|
||||
const { dispatch } = this.props;
|
||||
dispatch(reblog(status, privacy));
|
||||
dispatch(reblog(status.id, privacy));
|
||||
};
|
||||
|
||||
handleReblogClick = e => {
|
||||
|
@ -132,7 +132,7 @@ class Footer extends ImmutablePureComponent {
|
|||
|
||||
if (signedIn) {
|
||||
if (status.get('reblogged')) {
|
||||
dispatch(unreblog(status));
|
||||
dispatch(unreblog(status.id));
|
||||
} else if ((e && e.shiftKey) || !boostModal) {
|
||||
this._performReblog(status);
|
||||
} else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue