diff --git a/src/app/accounts/[address]/dao-cells.js b/src/app/accounts/[address]/dao-cells.js index b9f5ecd..c8dca2f 100644 --- a/src/app/accounts/[address]/dao-cells.js +++ b/src/app/accounts/[address]/dao-cells.js @@ -80,14 +80,14 @@ export function WithdrawRow({ address, cell, tipHeader }) { const depositBlockNumber = dao.getDepositBlockNumberFromWithdrawCell(cell); const depositHeader = useHeaderByNumber(depositBlockNumber); const withdrawHeader = useHeaderByNumber(cell.blockNumber); - const waitingDuration = - tipHeader && depositHeader && withdrawHeader - ? dao.estimateWithdrawWaitingDurationUntil( - tipHeader, - depositHeader, - withdrawHeader, - ) - : null; + const loaded = tipHeader && depositHeader && withdrawHeader; + const waitingDuration = loaded + ? dao.estimateWithdrawWaitingDurationUntil( + tipHeader, + depositHeader, + withdrawHeader, + ) + : null; const key = cellKey(cell); return ( @@ -95,29 +95,33 @@ export function WithdrawRow({ address, cell, tipHeader }) { - - {tipHeader && depositHeader ? ( - <> - + - - ) : ( + {loaded ? ( + <> + + <> + + + + + + {waitingDuration ? ( +

Waiting for {waitingDuration.humanize()}

+ ) : ( + + )} + + + ) : ( + - )} - - - {waitingDuration ? ( -

Waiting for {waitingDuration.humanize()}

- ) : ( - - )} - + + )} ); }