0
0
Fork 0

Remove global boosts state and convert boosts modal to Typescript (#29774)

This commit is contained in:
Renaud Chaput 2024-03-28 16:33:15 +01:00 committed by GitHub
parent 8a498f4e65
commit 67442f9039
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
13 changed files with 175 additions and 198 deletions

View file

@ -1,6 +1,5 @@
import { connect } from 'react-redux';
import { initBoostModal } from '../../../actions/boosts';
import { mentionCompose } from '../../../actions/compose';
import {
reblog,
@ -8,6 +7,7 @@ import {
unreblog,
unfavourite,
} from '../../../actions/interactions';
import { openModal } from '../../../actions/modal';
import {
hideStatus,
revealStatus,
@ -49,7 +49,7 @@ const mapDispatchToProps = dispatch => ({
if (e.shiftKey || !boostModal) {
this.onModalReblog(status);
} else {
dispatch(initBoostModal({ status, onReblog: this.onModalReblog }));
dispatch(openModal({ modalType: 'BOOST', modalProps: { status, onReblog: this.onModalReblog } }));
}
}
},