Commit 30984785 authored by isstuev's avatar isstuev

change ad position on detailed page

parent e6887288
......@@ -11,6 +11,7 @@ import AddressDetails from 'ui/address/AddressDetails';
import AddressInternalTxs from 'ui/address/AddressInternalTxs';
import AddressTokenTransfers from 'ui/address/AddressTokenTransfers';
import AddressTxs from 'ui/address/AddressTxs';
import TextAd from 'ui/shared/ad/TextAd';
import Page from 'ui/shared/Page/Page';
import PageTitle from 'ui/shared/Page/PageTitle';
import RoutedTabs from 'ui/shared/RoutedTabs/RoutedTabs';
......@@ -44,10 +45,10 @@ const AddressPageContent = () => {
return (
<Page>
<TextAd mb={ 6 }/>
<PageTitle
text={ `${ addressQuery.data?.is_contract ? 'Contract' : 'Address' } details` }
additionals={ tagsNode }
withTextAd
/>
<AddressDetails addressQuery={ addressQuery }/>
<RoutedTabs tabs={ tabs } tabListProps={{ mt: 8 }}/>
......
......@@ -8,6 +8,7 @@ import useIsMobile from 'lib/hooks/useIsMobile';
import useQueryWithPages from 'lib/hooks/useQueryWithPages';
import isBrowser from 'lib/isBrowser';
import BlockDetails from 'ui/block/BlockDetails';
import TextAd from 'ui/shared/ad/TextAd';
import Page from 'ui/shared/Page/Page';
import PageTitle from 'ui/shared/Page/PageTitle';
import Pagination from 'ui/shared/Pagination';
......@@ -50,11 +51,11 @@ const BlockPageContent = () => {
return (
<Page>
<TextAd mb={ 6 }/>
<PageTitle
text={ `Block #${ router.query.id }` }
backLinkUrl={ hasGoBackLink ? referrer : undefined }
backLinkLabel="Back to blocks list"
withTextAd
/>
<RoutedTabs
tabs={ tabs }
......
......@@ -9,6 +9,7 @@ import useApiQuery from 'lib/api/useApiQuery';
import { useAppContext } from 'lib/appContext';
import isBrowser from 'lib/isBrowser';
import networkExplorers from 'lib/networks/networkExplorers';
import TextAd from 'ui/shared/ad/TextAd';
import ExternalLink from 'ui/shared/ExternalLink';
import Page from 'ui/shared/Page/Page';
import PageTitle from 'ui/shared/Page/PageTitle';
......@@ -51,17 +52,9 @@ const TransactionPageContent = () => {
return <ExternalLink key={ explorer.baseUrl } title={ `Open in ${ explorer.title }` } href={ url.toString() }/>;
});
const tag = data?.tx_tag ? <Tag my={ 2 }>{ data.tx_tag }</Tag> : undefined;
return (
<Page>
<PageTitle
text="Transaction details"
additionals={ tag }
backLinkUrl={ hasGoBackLink ? referrer : undefined }
backLinkLabel="Back to transactions list"
withTextAd
/>
const additionals = (
<Flex justifyContent="space-between" alignItems="center" flexGrow={ 1 }>
{ data?.tx_tag && <Tag my={ 2 }>{ data.tx_tag }</Tag> }
{ explorersLinks.length > 0 && (
<Flex
alignItems="center"
......@@ -69,13 +62,22 @@ const TransactionPageContent = () => {
columnGap={ 6 }
rowGap={ 3 }
ml={{ base: 'initial', lg: 'auto' }}
mb={ 6 }
py={ 2.5 }
mt="-16px"
>
{ explorersLinks }
</Flex>
) }
</Flex>
);
return (
<Page>
<TextAd mb={ 6 }/>
<PageTitle
text="Transaction details"
additionals={ additionals }
backLinkUrl={ hasGoBackLink ? referrer : undefined }
backLinkLabel="Back to transactions list"
/>
<RoutedTabs tabs={ TABS }/>
</Page>
);
......
......@@ -26,7 +26,7 @@ const PageTitle = ({ text, additionals, withTextAd, backLinkUrl, backLinkLabel,
justifyContent="space-between"
className={ className }
>
<Flex flexWrap="wrap" columnGap={ 3 } alignItems="center">
<Flex flexWrap="wrap" columnGap={ 3 } alignItems="center" width={ withTextAd ? 'unset' : '100%' }>
{ backLinkUrl && (
<Tooltip label={ backLinkLabel }>
<Link display="inline-flex" href={ backLinkUrl }>
......
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