Commit 92e42940 authored by tom's avatar tom

improve loader for ad banner

parent 0ee23c4f
......@@ -49,7 +49,7 @@ const Home = () => {
</Box>
<Stats/>
<ChainIndicators/>
<AdBanner mt={{ base: 6, lg: 8 }} justifyContent="center"/>
<AdBanner mt={{ base: 6, lg: 8 }} mx="auto"/>
<Flex mt={ 8 } direction={{ base: 'column', lg: 'row' }} columnGap={ 12 } rowGap={ 8 }>
<LatestBlocks/>
<LatestTxs/>
......
......@@ -22,7 +22,7 @@ const DetailsSponsoredItem = ({ isLoading }: Props) => {
if (isMobile) {
return (
<GridItem mt={ 5 }>
<AdBanner justifyContent="center" isLoading={ isLoading }/>
<AdBanner mx="auto" isLoading={ isLoading }/>
</GridItem>
);
}
......
......@@ -16,11 +16,19 @@ const AdBanner = ({ className, isLoading }: { className?: string; isLoading?: bo
return null;
}
if (appConfig.ad.adButlerOn) {
return <Skeleton className={ className } isLoaded={ !isLoading } borderRadius="none"><AdbutlerBanner className={ className }/></Skeleton>;
}
const content = appConfig.ad.adButlerOn ? <AdbutlerBanner/> : <CoinzillaBanner/>;
return <Skeleton className={ className } isLoaded={ !isLoading } borderRadius="none"><CoinzillaBanner className={ className }/></Skeleton>;
return (
<Skeleton
className={ className }
isLoaded={ !isLoading }
borderRadius="none"
maxW={ appConfig.ad.adButlerOn ? '760px' : '728px' }
w="100%"
>
{ content }
</Skeleton>
);
};
export default chakra(AdBanner);
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