lbry-desktop/ui/component/youtubeTransferStatus/index.js
2020-06-16 09:56:32 -04:00

24 lines
849 B
JavaScript

import { connect } from 'react-redux';
import { doClaimYoutubeChannels, doUserFetch, doCheckYoutubeTransfer } from 'redux/actions/user';
import {
selectYoutubeChannels,
selectYouTubeImportVideosComplete,
selectYouTubeImportPending,
selectUserIsPending,
} from 'redux/selectors/user';
import YoutubeChannelList from './view';
const select = state => ({
youtubeChannels: selectYoutubeChannels(state),
youtubeImportPending: selectYouTubeImportPending(state),
userFetchPending: selectUserIsPending(state),
videosImported: selectYouTubeImportVideosComplete(state),
});
const perform = dispatch => ({
claimChannels: () => dispatch(doClaimYoutubeChannels()),
updateUser: () => dispatch(doUserFetch()),
checkYoutubeTransfer: () => dispatch(doCheckYoutubeTransfer()),
});
export default connect(select, perform)(YoutubeChannelList);