2019-07-08 16:54:58 -04:00
|
|
|
import { connect } from 'react-redux';
|
2019-08-02 11:11:31 -04:00
|
|
|
import { selectChannelIsBlocked, doToggleBlockChannel, doToast, makeSelectShortUrlForUri } from 'lbry-redux';
|
2019-07-08 16:54:58 -04:00
|
|
|
import BlockButton from './view';
|
|
|
|
|
|
|
|
const select = (state, props) => ({
|
|
|
|
channelIsBlocked: selectChannelIsBlocked(props.uri)(state),
|
2019-08-02 11:11:31 -04:00
|
|
|
shortUrl: makeSelectShortUrlForUri(props.uri)(state),
|
2019-07-08 16:54:58 -04:00
|
|
|
});
|
|
|
|
|
|
|
|
export default connect(
|
|
|
|
select,
|
|
|
|
{
|
|
|
|
toggleBlockChannel: doToggleBlockChannel,
|
|
|
|
doToast,
|
|
|
|
}
|
|
|
|
)(BlockButton);
|