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

30 lines
811 B
JavaScript
Raw Normal View History

2019-09-12 21:53:33 -04:00
import { connect } from 'react-redux';
2019-09-17 17:16:36 -04:00
import {
selectYoutubeChannels,
2019-10-01 00:53:33 -04:00
selectYouTubeImportPending,
2019-09-17 17:16:36 -04:00
selectUserIsPending,
doClaimYoutubeChannels,
doUserFetch,
2019-10-01 00:53:33 -04:00
selectYouTubeImportVideosComplete,
doCheckYoutubeTransfer,
2019-09-17 17:16:36 -04:00
} from 'lbryinc';
2019-09-12 21:53:33 -04:00
import YoutubeChannelList from './view';
const select = state => ({
youtubeChannels: selectYoutubeChannels(state),
2019-10-01 00:53:33 -04:00
youtubeImportPending: selectYouTubeImportPending(state),
2019-09-17 17:16:36 -04:00
userFetchPending: selectUserIsPending(state),
2019-10-01 00:53:33 -04:00
videosImported: selectYouTubeImportVideosComplete(state),
2019-09-12 21:53:33 -04:00
});
2019-09-16 15:28:30 -04:00
const perform = dispatch => ({
claimChannels: () => dispatch(doClaimYoutubeChannels()),
updateUser: () => dispatch(doUserFetch()),
checkYoutubeTransfer: () => dispatch(doCheckYoutubeTransfer()),
2019-09-16 15:28:30 -04:00
});
2019-09-12 21:53:33 -04:00
export default connect(
select,
2019-09-16 15:28:30 -04:00
perform
2019-09-12 21:53:33 -04:00
)(YoutubeChannelList);