Commit 84d0f06f authored by tom's avatar tom

minor fixes

parent 85a25d22
...@@ -49,15 +49,18 @@ const BlockPageContent = () => { ...@@ -49,15 +49,18 @@ const BlockPageContent = () => {
const hasPagination = !isMobile && router.query.tab === 'txs' && blockTxsQuery.isPaginationVisible; const hasPagination = !isMobile && router.query.tab === 'txs' && blockTxsQuery.isPaginationVisible;
const referrer = isInBrowser ? window.document.referrer : appProps.referrer; const referrer = isInBrowser ? window.document.referrer : appProps.referrer;
const hasGoBackLink = referrer && referrer.includes('/blocks');
return ( return (
<Page> <Page>
<Flex alignItems="center" columnGap={ 3 }> <Flex alignItems="center" columnGap={ 3 }>
<Tooltip label="Back to blocks list"> { hasGoBackLink && (
<Link mb={ 6 } display="inline-flex" href={ referrer }> <Tooltip label="Back to blocks list">
<Icon as={ eastArrowIcon } boxSize={ 6 } transform="rotate(180deg)"/> <Link mb={ 6 } display="inline-flex" href={ referrer }>
</Link> <Icon as={ eastArrowIcon } boxSize={ 6 } transform="rotate(180deg)"/>
</Tooltip> </Link>
</Tooltip>
) }
<PageTitle text={ `Block #${ router.query.id }` }/> <PageTitle text={ `Block #${ router.query.id }` }/>
</Flex> </Flex>
<RoutedTabs <RoutedTabs
......
...@@ -77,18 +77,20 @@ const TxsListItem = ({ tx, showBlockInfo, currentAddress }: Props) => { ...@@ -77,18 +77,20 @@ const TxsListItem = ({ tx, showBlockInfo, currentAddress }: Props) => {
</Flex> </Flex>
<Text variant="secondary" fontWeight="400" fontSize="sm">{ dayjs(tx.timestamp).fromNow() }</Text> <Text variant="secondary" fontWeight="400" fontSize="sm">{ dayjs(tx.timestamp).fromNow() }</Text>
</Flex> </Flex>
<Flex mt={ 3 }> { tx.method && (
<Text as="span" whiteSpace="pre">Method </Text> <Flex mt={ 3 }>
<Text <Text as="span" whiteSpace="pre">Method </Text>
as="span" <Text
variant="secondary" as="span"
overflow="hidden" variant="secondary"
whiteSpace="nowrap" overflow="hidden"
textOverflow="ellipsis" whiteSpace="nowrap"
> textOverflow="ellipsis"
{ tx.method } >
</Text> { tx.method }
</Flex> </Text>
</Flex>
) }
{ showBlockInfo && tx.block !== null && ( { showBlockInfo && tx.block !== null && (
<Box mt={ 2 }> <Box mt={ 2 }>
<Text as="span">Block </Text> <Text as="span">Block </Text>
......
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