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 ...@@ -72,9 +72,11 @@ const TokenTransfer = ({ isLoading: isLoadingProp, isDisabled, queryName, queryI
return ( return (
<> <>
<ActionBar> { pagination.page === 1 && !pagination.hasNextPage ? null : (
<Pagination ml="auto" { ...pagination }/> <ActionBar>
</ActionBar> <Pagination ml="auto" { ...pagination }/>
</ActionBar>
) }
{ content } { content }
</> </>
); );
......
...@@ -12,7 +12,7 @@ interface Props { ...@@ -12,7 +12,7 @@ interface Props {
showTxInfo?: boolean; showTxInfo?: boolean;
} }
const TxInternalsTable = ({ data, baseAddress, showTxInfo }: Props) => { const TokenTransferTable = ({ data, baseAddress, showTxInfo }: Props) => {
return ( return (
<Table variant="simple" size="sm"> <Table variant="simple" size="sm">
...@@ -37,4 +37,4 @@ const TxInternalsTable = ({ data, baseAddress, showTxInfo }: Props) => { ...@@ -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 = () => { ...@@ -25,7 +25,7 @@ const TxTokenTransfer = () => {
return ( return (
<> <>
<Text>Token transfers for transaction { data?.hash }</Text> <Text mb={ 6 }>Token transfers for transaction { data?.hash }</Text>
<TokenTransfer <TokenTransfer
isLoading={ isLoading } isLoading={ isLoading }
isDisabled={ !data?.status || !data?.hash } isDisabled={ !data?.status || !data?.hash }
......
...@@ -17,10 +17,10 @@ interface Props { ...@@ -17,10 +17,10 @@ interface Props {
} }
const TOKEN_TRANSFERS_TYPES = [ const TOKEN_TRANSFERS_TYPES = [
{ title: 'Tokens Transferred', hint: 'List of tokens transferred in the transaction.', type: 'token_transfer' }, { 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 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 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 created', hint: 'List of tokens created in the transaction.', type: 'token_spawning' },
]; ];
const VISIBLE_ITEMS_NUM = 3; 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