diff --git a/src/ui/component/youtubeChannelList/index.js b/src/ui/component/youtubeChannelList/index.js index f5339291a..36e0fd5fb 100644 --- a/src/ui/component/youtubeChannelList/index.js +++ b/src/ui/component/youtubeChannelList/index.js @@ -1,6 +1,5 @@ import { connect } from 'react-redux'; -// fetchUserInfo -import { selectYoutubeChannels } from 'lbryinc'; +import { selectYoutubeChannels, doClaimYoutubeChannels, doUserFetch } from 'lbryinc'; import YoutubeChannelList from './view'; @@ -8,15 +7,12 @@ const select = state => ({ ytChannels: selectYoutubeChannels(state), }); -// const perform = dispatch => ({ -// claimChannels: () => dispatch(doTransfer) -// }); - -/* - - */ +const perform = dispatch => ({ + claimChannels: () => dispatch(doClaimYoutubeChannels()), + updateUser: () => dispatch(doUserFetch()), +}); export default connect( select, - null + perform )(YoutubeChannelList); diff --git a/src/ui/component/youtubeChannelList/internal/youtubeChannel.jsx b/src/ui/component/youtubeChannelList/internal/youtubeChannel.jsx index 5fec69e4f..e0479351f 100644 --- a/src/ui/component/youtubeChannelList/internal/youtubeChannel.jsx +++ b/src/ui/component/youtubeChannelList/internal/youtubeChannel.jsx @@ -20,24 +20,29 @@ export default function YoutubeChannelItem(props: Props) { const { yt_channel_name: ytName, lbry_channel_name: lbryName, - channel_claim_id: claimId, sync_status: syncStatus, status_token: statusToken, transferable, transfer_state: transferState, - publish_to_address: publishAddresses, } = props.channel; - const LbryYtUrl = 'https://lbry.com/youtube/status/'; - // - // - // {__('Youtube Name')} - // {__('LBRY Name')} - // {__('Sync Status')} - // {__('Transfer Status')} - // - // - const doTransfer = () => {}; + const LBRY_YT_URL = 'https://lbry.com/youtube/status/'; + const NOT_TRANSFERED = 'not_transferred'; + const PENDING_TRANSFER = 'pending_transfer'; + const COMPLETED_TRANSFER = 'completed_transfer'; + + function renderSwitch(param) { + switch (param) { + case NOT_TRANSFERED: + return __('Not Transferred'); + case PENDING_TRANSFER: + return __('Pending Transfer'); + case COMPLETED_TRANSFER: + return __('Completed Transfer'); + } + } + + // | Youtube Name | LBRY Name | SyncStatus | TransferStatus | return ( @@ -46,13 +51,9 @@ export default function YoutubeChannelItem(props: Props) {