-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #958 from alleslabs/feat/block-details-lite-2
feat: lite version on block index
- Loading branch information
Showing
37 changed files
with
636 additions
and
145 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
32 changes: 32 additions & 0 deletions
32
src/lib/pages/block-details/components/BlockTxsTableLite.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
import { EmptyState } from "lib/components/state"; | ||
import { TableTitle, TransactionsTable } from "lib/components/table"; | ||
import { useBlockDataLcd } from "lib/services/block"; | ||
|
||
interface BlockTxsTableProps { | ||
height: number; | ||
} | ||
|
||
export const BlockTxsTableLite = ({ height }: BlockTxsTableProps) => { | ||
const { data, isLoading } = useBlockDataLcd(height); | ||
const total = data?.transactions.length; | ||
|
||
return ( | ||
<> | ||
<TableTitle title="Transactions" count={total} /> | ||
<TransactionsTable | ||
transactions={data?.transactions} | ||
isLoading={isLoading} | ||
emptyState={ | ||
<EmptyState | ||
imageVariant="empty" | ||
message="There are no submitted transactions in this block" | ||
withBorder | ||
/> | ||
} | ||
showSuccess={false} | ||
showRelations={false} | ||
showTimestamp={false} | ||
/> | ||
</> | ||
); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
import { InvalidState } from "lib/components/state"; | ||
|
||
export const InvalidBlock = () => <InvalidState title="Block does not exist" />; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
export * from "./BlockDetailsTop"; | ||
export * from "./BlockInfo"; | ||
export * from "./BlockTxsTable"; | ||
export * from "./BlockTxsTableLite"; | ||
export * from "./BlockTxsTableFull"; |
Oops, something went wrong.