Commit e13f04e4 authored by tom's avatar tom

fix table header

parent e98ecfa1
......@@ -34,6 +34,8 @@ const TokenTransfer = ({ isLoading: isLoadingProp, isDisabled, queryName, queryI
options: { enabled: !isDisabled },
});
const isPaginatorHidden = pagination.page === 1 && !pagination.hasNextPage;
const content = (() => {
if (isLoading || isLoadingProp) {
return (
......@@ -64,7 +66,7 @@ const TokenTransfer = ({ isLoading: isLoadingProp, isDisabled, queryName, queryI
return (
<>
<Hide below="lg">
<TokenTransferTable data={ items } baseAddress={ baseAddress } showTxInfo={ showTxInfo }/>
<TokenTransferTable data={ items } baseAddress={ baseAddress } showTxInfo={ showTxInfo } top={ isPaginatorHidden ? 0 : 80 }/>
</Hide>
<Show below="lg">
<TokenTransferList data={ items } baseAddress={ baseAddress } showTxInfo={ showTxInfo }/>
......@@ -73,8 +75,6 @@ const TokenTransfer = ({ isLoading: isLoadingProp, isDisabled, queryName, queryI
);
})();
const isPaginatorHidden = pagination.page === 1 && !pagination.hasNextPage;
return (
<>
{ txHash && (data?.items.length || 0 > 0) && (
......
......@@ -10,13 +10,14 @@ interface Props {
data: Array<TokenTransfer>;
baseAddress?: string;
showTxInfo?: boolean;
top: number;
}
const TokenTransferTable = ({ data, baseAddress, showTxInfo }: Props) => {
const TokenTransferTable = ({ data, baseAddress, showTxInfo, top }: Props) => {
return (
<Table variant="simple" size="sm">
<Thead top={ 80 }>
<Thead top={ top }>
<Tr>
{ showTxInfo && <Th width="44px"></Th> }
<Th width="185px">Token</Th>
......
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