2019-09-13 03:53:33 +02:00
|
|
|
import { connect } from 'react-redux';
|
2020-06-15 22:33:03 +02:00
|
|
|
import { doClaimYoutubeChannels, doUserFetch, doCheckYoutubeTransfer } from 'redux/actions/user';
|
2019-09-17 23:16:36 +02:00
|
|
|
import {
|
|
|
|
selectYoutubeChannels,
|
2020-06-15 22:33:03 +02:00
|
|
|
selectYouTubeImportVideosComplete,
|
2019-10-01 06:53:33 +02:00
|
|
|
selectYouTubeImportPending,
|
2019-09-17 23:16:36 +02:00
|
|
|
selectUserIsPending,
|
2020-06-15 22:33:03 +02:00
|
|
|
} from 'redux/selectors/user';
|
2019-09-13 03:53:33 +02:00
|
|
|
import YoutubeChannelList from './view';
|
|
|
|
|
|
|
|
const select = state => ({
|
2019-09-26 18:28:08 +02:00
|
|
|
youtubeChannels: selectYoutubeChannels(state),
|
2019-10-01 06:53:33 +02:00
|
|
|
youtubeImportPending: selectYouTubeImportPending(state),
|
2019-09-17 23:16:36 +02:00
|
|
|
userFetchPending: selectUserIsPending(state),
|
2019-10-01 06:53:33 +02:00
|
|
|
videosImported: selectYouTubeImportVideosComplete(state),
|
2019-09-13 03:53:33 +02:00
|
|
|
});
|
|
|
|
|
2019-09-16 21:28:30 +02:00
|
|
|
const perform = dispatch => ({
|
|
|
|
claimChannels: () => dispatch(doClaimYoutubeChannels()),
|
|
|
|
updateUser: () => dispatch(doUserFetch()),
|
2019-09-26 18:28:08 +02:00
|
|
|
checkYoutubeTransfer: () => dispatch(doCheckYoutubeTransfer()),
|
2019-09-16 21:28:30 +02:00
|
|
|
});
|
2019-09-13 03:53:33 +02:00
|
|
|
|
2020-06-15 22:33:03 +02:00
|
|
|
export default connect(select, perform)(YoutubeChannelList);
|