Commit 24a85f07 authored by POA's avatar POA

Add vertical scroller for tx actions area (without 'Scroll for more' text note yet)

parent 9916c31f
...@@ -21,6 +21,7 @@ class MyDocument extends Document { ...@@ -21,6 +21,7 @@ class MyDocument extends Document {
<link rel="icon" sizes="16x16" type="image/png"href="/static/favicon-16x16.png"/> <link rel="icon" sizes="16x16" type="image/png"href="/static/favicon-16x16.png"/>
<link rel="apple-touch-icon" sizes="180x180" href="/static/apple-touch-icon.png"/> <link rel="apple-touch-icon" sizes="180x180" href="/static/apple-touch-icon.png"/>
<link rel="mask-icon" href="/static/safari-pinned-tab.svg" color="#5bbad5"/> <link rel="mask-icon" href="/static/safari-pinned-tab.svg" color="#5bbad5"/>
<link rel="stylesheet" href="/static/css/jquery.mCustomScrollbar.min.css" />
</Head> </Head>
<body> <body>
<ColorModeScript initialColorMode={ theme.config.initialColorMode }/> <ColorModeScript initialColorMode={ theme.config.initialColorMode }/>
......
This diff is collapsed.
This diff is collapsed.
This source diff could not be displayed because it is too large. You can view the blob instead.
import { Flex, Link, Icon, Tag } from '@chakra-ui/react'; import { Flex, Link, Icon, Tag } from '@chakra-ui/react';
import { useQuery } from '@tanstack/react-query'; import { useQuery } from '@tanstack/react-query';
import { useRouter } from 'next/router'; import { useRouter } from 'next/router';
import Script from 'next/script'
import React from 'react'; import React from 'react';
import type { Transaction } from 'types/api/transaction'; import type { Transaction } from 'types/api/transaction';
...@@ -85,6 +86,7 @@ const TransactionPageContent = () => { ...@@ -85,6 +86,7 @@ const TransactionPageContent = () => {
</Flex> </Flex>
<RoutedTabs tabs={ TABS }/> <RoutedTabs tabs={ TABS }/>
<AdBanner mt={ 6 } justifyContent={{ base: 'center', lg: 'start' }}/> <AdBanner mt={ 6 } justifyContent={{ base: 'center', lg: 'start' }}/>
<Script src="/static/js/jquery.min.js" strategy="beforeInteractive" />
</Page> </Page>
); );
}; };
......
...@@ -11,7 +11,7 @@ import BigNumber from 'bignumber.js'; ...@@ -11,7 +11,7 @@ import BigNumber from 'bignumber.js';
const uniswapIconUrl = 'https://raw.githubusercontent.com/trustwallet/assets/master/dapps/app.uniswap.org.png'; const uniswapIconUrl = 'https://raw.githubusercontent.com/trustwallet/assets/master/dapps/app.uniswap.org.png';
const TxDetailsAction = ({ protocol, type, data }) => { const TxDetailsAction = ({ protocol, type, data, isLast }) => {
if (protocol === 'uniswap_v3') { if (protocol === 'uniswap_v3') {
if (['mint', 'burn', 'collect', 'swap'].includes(type)) { if (['mint', 'burn', 'collect', 'swap'].includes(type)) {
const amount0 = BigNumber(data.amount0).toFormat(); const amount0 = BigNumber(data.amount0).toFormat();
...@@ -25,7 +25,7 @@ const TxDetailsAction = ({ protocol, type, data }) => { ...@@ -25,7 +25,7 @@ const TxDetailsAction = ({ protocol, type, data }) => {
} }
return ( return (
<Flex flexWrap="wrap" columnGap={ 1 } rowGap={ 2 }> <Flex flexWrap="wrap" columnGap={ 1 } rowGap={ 2 } marginBottom={ isLast ? 5 : 0 }>
<Text color="gray.500" as="span"> <Text color="gray.500" as="span">
{ actionName[type][0] } { actionName[type][0] }
</Text> </Text>
......
import { Flex } from '@chakra-ui/react'; import { Box, Flex } from '@chakra-ui/react';
import React from 'react'; import React from 'react';
import DetailsInfoItem from 'ui/shared/DetailsInfoItem'; import DetailsInfoItem from 'ui/shared/DetailsInfoItem';
...@@ -12,15 +12,17 @@ const TxDetailsActions = ({ actions }) => { ...@@ -12,15 +12,17 @@ const TxDetailsActions = ({ actions }) => {
hint="Highlighted events of the transaction" hint="Highlighted events of the transaction"
position="relative" position="relative"
> >
<Flex <Box className="mCustomScrollbar" data-mcs-theme="minimal-dark" maxH={ 40 }>
flexDirection="column" <Flex
alignItems="flex-start" flexDirection="column"
rowGap={ 5 } alignItems="flex-start"
w="100%" rowGap={ 5 }
fontWeight={ 500 } w="100%"
> fontWeight={ 500 }
{ actions.map((action, index) => <TxDetailsAction key={ index } { ...action }/>) } >
</Flex> { actions.map((action, index) => <TxDetailsAction key={ index } { ...action } isLast={ index === actions.length-1 }/>) }
</Flex>
</Box>
</DetailsInfoItem> </DetailsInfoItem>
); );
}; };
......
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