From 5515c94ce00522596692f39fb32e36e4f455d1f7 Mon Sep 17 00:00:00 2001 From: Oleg Silkin Date: Thu, 5 Dec 2019 17:27:26 -0500 Subject: [PATCH] Pushing up so I can work in class --- package.json | 2 +- ui/constants/modal_types.js | 2 +- ui/modal/modalChannelCreate/index.js | 11 +++++++++++ ui/modal/modalChannelCreate/view.jsx | 17 +++++++++++++++++ ui/page/channelCreate/index.js | 3 ++- ui/page/channels/view.jsx | 5 +++-- 6 files changed, 35 insertions(+), 5 deletions(-) create mode 100644 ui/modal/modalChannelCreate/index.js create mode 100644 ui/modal/modalChannelCreate/view.jsx diff --git a/package.json b/package.json index 360ed00cf..d19380fd8 100644 --- a/package.json +++ b/package.json @@ -159,7 +159,7 @@ "react-paginate": "^5.2.1", "react-redux": "^6.0.1", "react-router": "^5.0.0", - "react-router-dom": "^5.0.0", + "react-router-dom": "^5.1.0", "react-simplemde-editor": "^4.0.0", "react-spring": "^8.0.20", "react-sticky-box": "^0.8.0", diff --git a/ui/constants/modal_types.js b/ui/constants/modal_types.js index a082e000f..105d056b9 100644 --- a/ui/constants/modal_types.js +++ b/ui/constants/modal_types.js @@ -31,4 +31,4 @@ export const WALLET_SYNC = 'wallet_sync'; export const WALLET_PASSWORD_UNSAVE = 'wallet_password_unsave'; export const WALLET_SEND = 'wallet_send'; export const WALLET_RECEIVE = 'wallet_receive'; -export const YOUTUBE_WELCOME = 'youtube_welcome'; +export const CREATE_CHANNEL = 'create_channel'; diff --git a/ui/modal/modalChannelCreate/index.js b/ui/modal/modalChannelCreate/index.js new file mode 100644 index 000000000..2a39b84ce --- /dev/null +++ b/ui/modal/modalChannelCreate/index.js @@ -0,0 +1,11 @@ +import { connect } from 'react-redux'; +import { doHideModal } from 'redux/actions/app'; +import ChannelCreate from './view'; + +const select = state => ({}); + +const perform = { + doHideModal, +}; + +export default connect(select, perform)(ChannelCreate); diff --git a/ui/modal/modalChannelCreate/view.jsx b/ui/modal/modalChannelCreate/view.jsx new file mode 100644 index 000000000..7aa17108a --- /dev/null +++ b/ui/modal/modalChannelCreate/view.jsx @@ -0,0 +1,17 @@ +// @flow +import React from 'react'; +import ChannelCreate from 'component/channelCreate'; +import { Modal } from 'modal/modal'; + +type Props = { doHideModal: () => void }; + +const ChannelCreateModal = (props: Props) => { + const { doHideModal } = props; + return ( + + + + ); +}; + +export default ChannelCreateModal; diff --git a/ui/page/channelCreate/index.js b/ui/page/channelCreate/index.js index 9770f416f..4e2a2927b 100644 --- a/ui/page/channelCreate/index.js +++ b/ui/page/channelCreate/index.js @@ -1,9 +1,10 @@ import { connect } from 'react-redux'; import { selectBalance } from 'lbry-redux'; import ChannelCreatePage from './view'; +import { withRouter } from 'react-router'; const select = state => ({ balance: selectBalance(state), }); -export default connect(select, null)(ChannelCreatePage); +export default withRouter(connect(select, null)(ChannelCreatePage)); diff --git a/ui/page/channels/view.jsx b/ui/page/channels/view.jsx index 4f16df235..c5738ec04 100644 --- a/ui/page/channels/view.jsx +++ b/ui/page/channels/view.jsx @@ -7,6 +7,8 @@ import YoutubeTransferStatus from 'component/youtubeTransferStatus'; import Spinner from 'component/spinner'; import * as PAGES from 'constants/pages'; import * as ICONS from 'constants/icons'; +import * as MODALS from 'constants/modal_types'; +import { doOpenModal } from '../../redux/actions/app'; type Props = { channels: Array, @@ -49,9 +51,8 @@ export default function ChannelsPage(props: Props) {