diff --git a/ui/component/router/view.jsx b/ui/component/router/view.jsx index 9269b72e9..2efd9d403 100644 --- a/ui/component/router/view.jsx +++ b/ui/component/router/view.jsx @@ -46,6 +46,7 @@ import CheckoutPage from 'page/checkoutPage'; import ChannelNew from 'page/channelNew'; import RepostNew from 'page/repost'; import BuyPage from 'page/buy'; +import ReceivePage from 'page/receive'; import NotificationsPage from 'page/notifications'; import SignInWalletPasswordPage from 'page/signInWalletPassword'; import YoutubeSyncPage from 'page/youtubeSync'; @@ -281,6 +282,7 @@ function AppRouter(props: Props) { + diff --git a/ui/component/walletAddress/view.jsx b/ui/component/walletAddress/view.jsx index 8f6ab8576..4d0e27400 100644 --- a/ui/component/walletAddress/view.jsx +++ b/ui/component/walletAddress/view.jsx @@ -4,10 +4,9 @@ import Button from 'component/button'; import CopyableText from 'component/copyableText'; import QRCode from 'component/common/qr-code'; import Card from 'component/common/card'; -import LbcSymbol from 'component/common/lbc-symbol'; type Props = { - checkAddressIsMine: string => void, + checkAddressIsMine: (string) => void, receiveAddress: string, getNewAddress: () => void, gettingNewAddress: boolean, @@ -49,7 +48,7 @@ class WalletAddress extends React.PureComponent { return ( } + title={__('Receive Credits')} subtitle={__('Use this address to receive LBRY Credits.')} actions={ diff --git a/ui/component/walletBalance/view.jsx b/ui/component/walletBalance/view.jsx index 74829a840..eec9d2864 100644 --- a/ui/component/walletBalance/view.jsx +++ b/ui/component/walletBalance/view.jsx @@ -17,7 +17,7 @@ type Props = { claimsBalance: number, supportsBalance: number, tipsBalance: number, - doOpenModal: string => void, + doOpenModal: (string) => void, hasSynced: boolean, doFetchUtxoCounts: () => void, doUtxoConsolidate: () => void, @@ -153,12 +153,7 @@ const WalletBalance = (props: Props) => { {/* @endif */} - doOpenModal(MODALS.WALLET_RECEIVE)} - /> + ({ +const select = (state) => ({ balance: selectBalance(state), }); -export default connect(select, { - doOpenModal, -})(Wallet); +export default connect(select, {})(Wallet); diff --git a/ui/component/yrblWalletEmpty/view.jsx b/ui/component/yrblWalletEmpty/view.jsx index 3cb5cc96b..d30b94095 100644 --- a/ui/component/yrblWalletEmpty/view.jsx +++ b/ui/component/yrblWalletEmpty/view.jsx @@ -1,6 +1,5 @@ // @flow import type { Node } from 'react'; -import * as MODALS from 'constants/modal_types'; import * as ICONS from 'constants/icons'; import * as PAGES from 'constants/pages'; import React from 'react'; @@ -13,10 +12,9 @@ type Props = { includeWalletLink: boolean, type?: string, actions?: Node, - doOpenModal: string => void, }; export default function YrblHelp(props: Props) { - const { includeWalletLink = false, type = 'sad', doOpenModal } = props; + const { includeWalletLink = false, type = 'sad' } = props; return ( @@ -47,7 +45,7 @@ export default function YrblHelp(props: Props) { icon={ICONS.RECEIVE} button="secondary" label={__('Your Address')} - onClick={() => doOpenModal(MODALS.WALLET_RECEIVE)} + navigate={`/$/${PAGES.RECEIVE}`} /> )} diff --git a/ui/constants/modal_types.js b/ui/constants/modal_types.js index 5d302f0ca..503f43ded 100644 --- a/ui/constants/modal_types.js +++ b/ui/constants/modal_types.js @@ -32,7 +32,6 @@ export const WALLET_UNLOCK = 'wallet_unlock'; 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 CREATE_CHANNEL = 'create_channel'; export const YOUTUBE_WELCOME = 'youtube_welcome'; export const SET_REFERRER = 'set_referrer'; diff --git a/ui/constants/pages.js b/ui/constants/pages.js index 20c951986..dfb00af73 100644 --- a/ui/constants/pages.js +++ b/ui/constants/pages.js @@ -57,6 +57,7 @@ exports.CREATOR_DASHBOARD = 'dashboard'; exports.CHECKOUT = 'checkout'; exports.CODE_2257 = '2257'; exports.BUY = 'buy'; +exports.RECEIVE = 'receive'; exports.CHANNEL_NEW = 'channel/new'; exports.NOTIFICATIONS = 'notifications'; exports.YOUTUBE_SYNC = 'youtube'; diff --git a/ui/modal/modalRouter/view.jsx b/ui/modal/modalRouter/view.jsx index 99f6c250d..6bb3eda21 100644 --- a/ui/modal/modalRouter/view.jsx +++ b/ui/modal/modalRouter/view.jsx @@ -29,7 +29,6 @@ import ModalRewardCode from 'modal/modalRewardCode'; import ModalPasswordUnsave from 'modal/modalPasswordUnsave'; import ModalCommentAcknowledgement from 'modal/modalCommentAcknowledgement'; import ModalWalletSend from 'modal/modalWalletSend'; -import ModalWalletReceive from 'modal/modalWalletReceive'; import ModalYoutubeWelcome from 'modal/modalYoutubeWelcome'; import ModalSetReferrer from 'modal/modalSetReferrer'; import ModalSignOut from 'modal/modalSignOut'; @@ -122,8 +121,6 @@ function ModalRouter(props: Props) { return ; case MODALS.WALLET_SEND: return ; - case MODALS.WALLET_RECEIVE: - return ; case MODALS.YOUTUBE_WELCOME: return ; case MODALS.SET_REFERRER: diff --git a/ui/modal/modalWalletReceive/index.js b/ui/modal/modalWalletReceive/index.js deleted file mode 100644 index 9b06eba91..000000000 --- a/ui/modal/modalWalletReceive/index.js +++ /dev/null @@ -1,14 +0,0 @@ -import { connect } from 'react-redux'; -import { doHideModal } from 'redux/actions/app'; -import WalletReceive from './view'; - -const select = state => ({}); - -const perform = { - doHideModal, -}; - -export default connect( - select, - perform -)(WalletReceive); diff --git a/ui/modal/modalWalletReceive/view.jsx b/ui/modal/modalWalletReceive/view.jsx deleted file mode 100644 index 5021bfde6..000000000 --- a/ui/modal/modalWalletReceive/view.jsx +++ /dev/null @@ -1,16 +0,0 @@ -// @flow -import React from 'react'; -import WalletAddress from 'component/walletAddress'; -import { Modal } from 'modal/modal'; - -type Props = { doHideModal: () => void }; - -const WalletAddressPage = (props: Props) => { - const { doHideModal } = props; - return ( - - - - ); -}; -export default WalletAddressPage; diff --git a/ui/page/receive/index.js b/ui/page/receive/index.js new file mode 100644 index 000000000..5f7bfcb4e --- /dev/null +++ b/ui/page/receive/index.js @@ -0,0 +1,6 @@ +import { connect } from 'react-redux'; +import ReceivePage from './view'; + +const select = (state) => ({}); + +export default connect(select, {})(ReceivePage); diff --git a/ui/page/receive/view.jsx b/ui/page/receive/view.jsx new file mode 100644 index 000000000..c760f8006 --- /dev/null +++ b/ui/page/receive/view.jsx @@ -0,0 +1,26 @@ +// @flow +import React from 'react'; +import Page from 'component/page'; +import LbcSymbol from 'component/common/lbc-symbol'; +import WalletAddress from 'component/walletAddress'; + +type Props = {}; + +export default function ReceivePage(props: Props) { + return ( + + + > + ), + }} + > + + + ); +}