From e52d78d63e14451655260318d74365dd9fa4da9e Mon Sep 17 00:00:00 2001 From: jessop Date: Thu, 12 Sep 2019 21:53:33 -0400 Subject: [PATCH] display youtube channels --- src/ui/component/youtubeChannelList/index.js | 22 +++++++ .../internal/youtubeChannel.jsx | 58 +++++++++++++++++++ src/ui/component/youtubeChannelList/view.jsx | 34 +++++++++++ src/ui/page/account/view.jsx | 2 + 4 files changed, 116 insertions(+) create mode 100644 src/ui/component/youtubeChannelList/index.js create mode 100644 src/ui/component/youtubeChannelList/internal/youtubeChannel.jsx create mode 100644 src/ui/component/youtubeChannelList/view.jsx diff --git a/src/ui/component/youtubeChannelList/index.js b/src/ui/component/youtubeChannelList/index.js new file mode 100644 index 000000000..f5339291a --- /dev/null +++ b/src/ui/component/youtubeChannelList/index.js @@ -0,0 +1,22 @@ +import { connect } from 'react-redux'; +// fetchUserInfo +import { selectYoutubeChannels } from 'lbryinc'; + +import YoutubeChannelList from './view'; + +const select = state => ({ + ytChannels: selectYoutubeChannels(state), +}); + +// const perform = dispatch => ({ +// claimChannels: () => dispatch(doTransfer) +// }); + +/* + + */ + +export default connect( + select, + null +)(YoutubeChannelList); diff --git a/src/ui/component/youtubeChannelList/internal/youtubeChannel.jsx b/src/ui/component/youtubeChannelList/internal/youtubeChannel.jsx new file mode 100644 index 000000000..5fec69e4f --- /dev/null +++ b/src/ui/component/youtubeChannelList/internal/youtubeChannel.jsx @@ -0,0 +1,58 @@ +// @flow +import React from 'react'; +import Button from 'component/button'; +type Channel = { + yt_channel_name: string, + lbry_channel_name: string, + channel_claim_id: string, + sync_status: string, + status_token: string, + transferable: boolean, + transfer_state: string, + publish_to_address: Array, +}; + +type Props = { + channel: Channel, +}; + +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 = () => {}; + + return ( + + {ytName} + +