use totalBalance for check to show empty wallet page or not

This commit is contained in:
Sean Yesmunt 2021-02-05 12:46:07 -05:00
parent c784c5393d
commit 03f419a49c
2 changed files with 6 additions and 6 deletions

View file

@ -1,10 +1,10 @@
import { connect } from 'react-redux'; import { connect } from 'react-redux';
import { selectBalance } from 'lbry-redux'; import { selectTotalBalance } from 'lbry-redux';
import { doOpenModal } from 'redux/actions/app'; import { doOpenModal } from 'redux/actions/app';
import Wallet from './view'; import Wallet from './view';
const select = state => ({ const select = state => ({
balance: selectBalance(state), totalBalance: selectTotalBalance(state),
}); });
export default connect(select, { export default connect(select, {

View file

@ -10,14 +10,14 @@ import YrblWalletEmpty from 'component/yrblWalletEmpty';
type Props = { type Props = {
history: { action: string, push: string => void, replace: string => void }, history: { action: string, push: string => void, replace: string => void },
location: { search: string, pathname: string }, location: { search: string, pathname: string },
balance: number, totalBalance: ?number,
}; };
const WalletPage = (props: Props) => { const WalletPage = (props: Props) => {
const { location, balance } = props; const { location, totalBalance } = props;
const { search } = location; const { search } = location;
const showIntro = balance === 0; const showIntro = totalBalance === 0;
const loading = balance === undefined; const loading = totalBalance === undefined;
return ( return (
<Page> <Page>