Explorer: Show empty state when block has no transactions (#13259)

This commit is contained in:
Justin Starry 2020-10-29 09:51:19 +08:00 committed by GitHub
parent de71fb9bdd
commit 2cf44a9e14
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 51 additions and 47 deletions

View File

@ -68,6 +68,9 @@ export function BlockHistoryCard({ slot }: { slot: number }) {
</TableCardBody>
</div>
{confirmedBlock.data.transactions.length === 0 ? (
<ErrorCard text="This block has no transactions" />
) : (
<div className="card">
<div className="card-header align-items-center">
<h3 className="card-header-title">Block Transactions</h3>
@ -119,6 +122,7 @@ export function BlockHistoryCard({ slot }: { slot: number }) {
</table>
</div>
</div>
)}
</>
);
}