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 { selectBalance } from 'lbry-redux';
import { selectTotalBalance } from 'lbry-redux';
import { doOpenModal } from 'redux/actions/app';
import Wallet from './view';
const select = state => ({
balance: selectBalance(state),
totalBalance: selectTotalBalance(state),
});
export default connect(select, {

View file

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