Fix missing txoList when balance is 0 (PR_1459)

This commit is contained in:
infinite-persistence 2022-05-05 17:24:25 +08:00
commit a4a20aa8e0
No known key found for this signature in database
GPG key ID: B9C3252EDC3D0AA0
3 changed files with 7 additions and 13 deletions

View file

@ -1,9 +1,9 @@
import { connect } from 'react-redux';
import { selectBalance } from 'redux/selectors/wallet';
import Wallet from './view';
import YrblWalletEmpty from './view';
const select = (state) => ({
balance: selectBalance(state),
});
export default connect(select, {})(Wallet);
export default connect(select)(YrblWalletEmpty);

View file

@ -13,7 +13,7 @@ type Props = {
type?: string,
actions?: Node,
};
export default function YrblHelp(props: Props) {
export default function YrblWalletEmpty(props: Props) {
const { includeWalletLink = false, type = 'sad' } = props;
return (

View file

@ -64,7 +64,6 @@ const WalletPage = (props: Props) => {
}
push(url);
}
// @endif
const { totalBalance } = props;
@ -89,22 +88,17 @@ const WalletPage = (props: Props) => {
<TabPanel>
<div className="section card-stack">
<div className="lbc-transactions">
{/* if the transactions are loading */}
{loading && (
<div className="main--empty">
<Spinner delayed />
</div>
)}
{/* when the transactions are finished loading */}
{!loading && (
<>
{showIntro ? (
<YrblWalletEmpty includeWalletLink />
) : (
<div className="card-stack">
<TxoList search={search} />
</div>
)}
{showIntro && <YrblWalletEmpty includeWalletLink />}
<div className="card-stack">
<TxoList search={search} />
</div>
</>
)}
</div>