Commit 1ab0c598 authored by tom goriunov's avatar tom goriunov Committed by GitHub

Bug: holders table doesn't fit viewport width if the address name is too long (#2899)

Fixes #2860
parent a04af423
......@@ -247,13 +247,14 @@ const TokenPageContent = () => {
return (
<>
{ (tab === 'token_transfers' || tab === '') && (
<TokenAdvancedFilterLink token={ tokenQuery.data }/>
<TokenAdvancedFilterLink token={ tokenQuery.data } ml={ 6 }/>
) }
{ tab === 'holders' && (
<AddressCsvExportLink
address={ hashString }
params={{ type: 'holders' }}
isLoading={ pagination?.isLoading }
ml={ 6 }
/>
) }
{ pagination?.isVisible && <Pagination { ...pagination }/> }
......
......@@ -7,15 +7,16 @@ import { route } from 'nextjs-routes';
import config from 'configs/app';
import useIsInitialLoading from 'lib/hooks/useIsInitialLoading';
import type { LinkProps } from 'toolkit/chakra/link';
import { Link } from 'toolkit/chakra/link';
import IconSvg from 'ui/shared/IconSvg';
interface Props {
interface Props extends LinkProps {
isLoading?: boolean;
token?: TokenInfo;
}
const TokenAdvancedFilterLink = ({ isLoading, token }: Props) => {
const TokenAdvancedFilterLink = ({ isLoading, token, ...rest }: Props) => {
const isInitialLoading = useIsInitialLoading(isLoading);
if (!token || !config.features.advancedFilter.isEnabled) {
......@@ -34,6 +35,7 @@ const TokenAdvancedFilterLink = ({ isLoading, token }: Props) => {
loading={ isInitialLoading }
minW={ 8 }
justifyContent="center"
{ ...rest }
>
<IconSvg name="filter" boxSize={ 6 }/>
<chakra.span ml={ 1 } hideBelow="lg">Advanced filter</chakra.span>
......
......@@ -14,12 +14,12 @@ interface Props {
const TokenHoldersTable = ({ data, token, top, isLoading }: Props) => {
return (
<TableRoot tableLayout="auto">
<TableRoot>
<TableHeaderSticky top={ top }>
<TableRow>
<TableColumnHeader>Holder</TableColumnHeader>
{ (token.type === 'ERC-1155' || token.type === 'ERC-404') && <TableColumnHeader>ID#</TableColumnHeader> }
<TableColumnHeader isNumeric>Quantity</TableColumnHeader>
<TableColumnHeader w="70%">Holder</TableColumnHeader>
{ (token.type === 'ERC-1155' || token.type === 'ERC-404') && <TableColumnHeader w="30%">ID#</TableColumnHeader> }
<TableColumnHeader isNumeric width="220px">Quantity</TableColumnHeader>
{ token.total_supply && token.type !== 'ERC-404' && <TableColumnHeader isNumeric width="175px">Percentage</TableColumnHeader> }
</TableRow>
</TableHeaderSticky>
......
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