Commit 2790cac8 authored by tom's avatar tom

hide paginator if there is only one page

parent 893505d2
......@@ -72,9 +72,11 @@ const TokenTransfer = ({ isLoading: isLoadingProp, isDisabled, queryName, queryI
return (
<>
<ActionBar>
<Pagination ml="auto" { ...pagination }/>
</ActionBar>
{ pagination.page === 1 && !pagination.hasNextPage ? null : (
<ActionBar>
<Pagination ml="auto" { ...pagination }/>
</ActionBar>
) }
{ content }
</>
);
......
......@@ -12,7 +12,7 @@ interface Props {
showTxInfo?: boolean;
}
const TxInternalsTable = ({ data, baseAddress, showTxInfo }: Props) => {
const TokenTransferTable = ({ data, baseAddress, showTxInfo }: Props) => {
return (
<Table variant="simple" size="sm">
......@@ -37,4 +37,4 @@ const TxInternalsTable = ({ data, baseAddress, showTxInfo }: Props) => {
);
};
export default React.memo(TxInternalsTable);
export default React.memo(TokenTransferTable);
......@@ -25,7 +25,7 @@ const TxTokenTransfer = () => {
return (
<>
<Text>Token transfers for transaction { data?.hash }</Text>
<Text mb={ 6 }>Token transfers for transaction { data?.hash }</Text>
<TokenTransfer
isLoading={ isLoading }
isDisabled={ !data?.status || !data?.hash }
......
......@@ -17,10 +17,10 @@ interface Props {
}
const TOKEN_TRANSFERS_TYPES = [
{ title: 'Tokens Transferred', hint: 'List of tokens transferred in the transaction.', type: 'token_transfer' },
{ title: 'Tokens Minted', hint: 'List of tokens minted in the transaction.', type: 'token_minting' },
{ title: 'Tokens Burnt', hint: 'List of tokens burnt in the transaction.', type: 'token_burning' },
{ title: 'Tokens Created', hint: 'List of tokens created in the transaction.', type: 'token_spawning' },
{ title: 'Tokens transferred', hint: 'List of tokens transferred in the transaction.', type: 'token_transfer' },
{ title: 'Tokens minted', hint: 'List of tokens minted in the transaction.', type: 'token_minting' },
{ title: 'Tokens burnt', hint: 'List of tokens burnt in the transaction.', type: 'token_burning' },
{ title: 'Tokens created', hint: 'List of tokens created in the transaction.', type: 'token_spawning' },
];
const VISIBLE_ITEMS_NUM = 3;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment