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