Commit 6e1ae251 authored by tom's avatar tom

Merge branch 'main' of github.com:tom2drum/block-scout into mobile-view-pages

parents 420cea06 be1f9f3e
...@@ -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" maxW="100%"> <HStack spacing={ 2 } alignContent="center" overflow="hidden" maxW="100%">
<Link <Link
......
...@@ -13,7 +13,7 @@ const TransactionSnippet = ({ hash }: Props) => { ...@@ -13,7 +13,7 @@ const TransactionSnippet = ({ hash }: Props) => {
<HStack spacing={ 2 } overflow="hidden" alignItems="start" maxW="100%"> <HStack spacing={ 2 } overflow="hidden" alignItems="start" maxW="100%">
<Icon as={ transactionIcon } boxSize={ 6 } color={ useColorModeValue('gray.500', 'gray.400') }/> <Icon as={ transactionIcon } boxSize={ 6 } color={ useColorModeValue('gray.500', 'gray.400') }/>
<Box overflow="hidden"> <Box overflow="hidden">
<AddressLinkWithTooltip address={ hash }/> <AddressLinkWithTooltip address={ hash } type="transaction"/>
</Box> </Box>
</HStack> </HStack>
); );
......
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