Commit ff834f0d authored by isstuev's avatar isstuev

fix tx link

parent beec5c82
...@@ -31,7 +31,7 @@ const AddressTagTableItem = ({ item, onEditClick, onDeleteClick }: Props) => { ...@@ -31,7 +31,7 @@ const AddressTagTableItem = ({ item, onEditClick, onDeleteClick }: Props) => {
return ( return (
<Tr alignItems="top" key={ item.id }> <Tr alignItems="top" key={ item.id }>
<Td> <Td>
<AddressLinkWithTooltip address={ item.transaction_hash }/> <AddressLinkWithTooltip address={ item.transaction_hash } type="transaction"/>
</Td> </Td>
<Td> <Td>
<Tooltip label={ item.name }> <Tooltip label={ item.name }>
......
...@@ -8,9 +8,19 @@ import CopyToClipboard from './CopyToClipboard'; ...@@ -8,9 +8,19 @@ import CopyToClipboard from './CopyToClipboard';
const FONT_WEIGHT = '600'; const FONT_WEIGHT = '600';
const AddressLinkWithTooltip = ({ address }: {address: string}) => { type Props = {
address: string;
type?: 'address' | 'transaction';
}
const AddressLinkWithTooltip = ({ address, type = 'address' }: Props) => {
const basePath = useBasePath(); const basePath = useBasePath();
const url = basePath + '/address/' + address + '/tokens#address-tabs'; let url;
if (type === 'transaction') {
url = basePath + '/tx/' + address;
} else {
url = basePath + '/address/' + address + '/tokens#address-tabs';
}
return ( return (
<HStack spacing={ 2 } alignContent="center" overflow="hidden"> <HStack spacing={ 2 } alignContent="center" overflow="hidden">
<Link <Link
......
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