Pushing up so I can work in class

This commit is contained in:
Oleg Silkin 2019-12-05 17:27:26 -05:00 committed by Sean Yesmunt
parent b389a4e139
commit 5515c94ce0
6 changed files with 35 additions and 5 deletions

View file

@ -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",

View file

@ -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';

View file

@ -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);

View file

@ -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 (
<Modal isOpen type="card" onAborted={doHideModal}>
<ChannelCreate />
</Modal>
);
};
export default ChannelCreateModal;

View file

@ -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));

View file

@ -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<ChannelClaim>,
@ -49,9 +51,8 @@ export default function ChannelsPage(props: Props) {
<Button
iconSize={20}
label={__('New Channel')}
button="link"
icon={ICONS.NEW_CHANNEL}
navigate={`/$/${PAGES.CHANNEL_CREATE}`}
onClick={() => doOpenModal(MODALS.CREATE_CHANNEL)}
/>
}
/>