lbry-desktop/ui/modal/modalBlockChannel/index.js
zeppi ee9f63a161 integrate all the things
bugfix

wip

flow

fix

cleaning

clean
2021-10-15 23:49:41 -04:00

24 lines
1 KiB
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 = (dispatch) => ({
closeModal: () => dispatch(doHideModal()),
commentModBlock: (a, b) => dispatch(doCommentModBlock(a, b)),
commentModBlockAsAdmin: (a, b, c) => dispatch(doCommentModBlockAsAdmin(a, b, c)),
commentModBlockAsModerator: (a, b, c, d) => dispatch(doCommentModBlockAsModerator(a, b, c, d)),
});
export default connect(select, perform)(ModalBlockChannel);