bigbuffet-rw/app/soapbox/features/compose/containers/quoted_status_container.js
marcin mikołajczak 22a70a7595 Quote posts: Compose box improvements
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2022-01-24 18:18:10 +01:00

26 lines
No EOL
655 B
JavaScript

import { connect } from 'react-redux';
import { cancelQuoteCompose } from 'soapbox/actions/compose';
import QuotedStatus from 'soapbox/features/status/components/quoted_status';
import { makeGetStatus } from 'soapbox/selectors';
const makeMapStateToProps = () => {
const getStatus = makeGetStatus();
const mapStateToProps = state => ({
status: getStatus(state, { id: state.getIn(['compose', 'quote']) }),
compose: true,
});
return mapStateToProps;
};
const mapDispatchToProps = dispatch => ({
onCancel() {
dispatch(cancelQuoteCompose());
},
});
export default connect(makeMapStateToProps, mapDispatchToProps)(QuotedStatus);