bc67379c26
* Simplify dispatch map Since none of dispatches are doing any custom transformation, just use a direct map. The number of arguments for the comment function are getting crazy. * Block: pass comment ID for deletion when being blocked.
23 lines
854 B
JavaScript
23 lines
854 B
JavaScript
import { connect } from 'react-redux';
|
|
import { makeSelectClaimForUri } from 'redux/selectors/claims';
|
|
import { doHideModal } from 'redux/actions/app';
|
|
import { doCommentModBlock, doCommentModBlockAsAdmin, doCommentModBlockAsModerator } from 'redux/actions/comments';
|
|
import { selectActiveChannelClaim } from 'redux/selectors/app';
|
|
import { selectModerationDelegatorsById } from 'redux/selectors/comments';
|
|
|
|
import ModalBlockChannel from './view';
|
|
|
|
const select = (state, props) => ({
|
|
activeChannelClaim: selectActiveChannelClaim(state),
|
|
contentClaim: makeSelectClaimForUri(props.contentUri)(state),
|
|
moderationDelegatorsById: selectModerationDelegatorsById(state),
|
|
});
|
|
|
|
const perform = {
|
|
doHideModal,
|
|
doCommentModBlock,
|
|
doCommentModBlockAsAdmin,
|
|
doCommentModBlockAsModerator,
|
|
};
|
|
|
|
export default connect(select, perform)(ModalBlockChannel);
|