lbry-desktop/ui/component/blockButton/index.js

23 lines
678 B
JavaScript
Raw Normal View History

import { connect } from 'react-redux';
import {
selectChannelIsBlocked,
doToggleBlockChannel,
makeSelectClaimIsMine,
makeSelectShortUrlForUri,
2019-09-04 06:22:31 +02:00
makeSelectPermanentUrlForUri,
} from 'lbry-redux';
import { doToast } from 'redux/actions/notifications';
import BlockButton from './view';
const select = (state, props) => ({
channelIsBlocked: selectChannelIsBlocked(props.uri)(state),
claimIsMine: makeSelectClaimIsMine(props.uri)(state),
2019-08-02 17:11:31 +02:00
shortUrl: makeSelectShortUrlForUri(props.uri)(state),
2019-09-04 06:22:31 +02:00
permanentUrl: makeSelectPermanentUrlForUri(props.uri)(state),
});
export default connect(select, {
toggleBlockChannel: doToggleBlockChannel,
doToast,
})(BlockButton);