use totalBalance for check to show empty wallet page or not
This commit is contained in:
parent
c784c5393d
commit
03f419a49c
2 changed files with 6 additions and 6 deletions
|
@ -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, {
|
||||
|
|
|
@ -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>
|
||||
|
|
Loading…
Reference in a new issue