Skip to content

Commit

Permalink
Merge pull request #9 from subspace/ft/remove-ads
Browse files Browse the repository at this point in the history
remove ads
  • Loading branch information
marc-aurele-besner authored Sep 26, 2023
2 parents 5bea21b + 9f8d7ec commit 4fbbd30
Show file tree
Hide file tree
Showing 24 changed files with 1 addition and 414 deletions.
1 change: 0 additions & 1 deletion nextjs/csp/generateCspPolicy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import { makePolicyString, mergeDescriptors } from './utils';
function generateCspPolicy() {
const policyDescriptor = mergeDescriptors(
descriptors.app(),
descriptors.ad(),
descriptors.cloudFlare(),
descriptors.googleAnalytics(),
descriptors.googleFonts(),
Expand Down
33 changes: 0 additions & 33 deletions nextjs/csp/policies/ad.ts

This file was deleted.

1 change: 0 additions & 1 deletion nextjs/csp/policies/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
export { ad } from './ad';
export { app } from './app';
export { cloudFlare } from './cloudFlare';
export { googleAnalytics } from './googleAnalytics';
Expand Down
2 changes: 0 additions & 2 deletions ui/address/AddressDetails.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ import AddressCounterItem from 'ui/address/details/AddressCounterItem';
import AddressHeadingInfo from 'ui/shared/AddressHeadingInfo';
import DataFetchAlert from 'ui/shared/DataFetchAlert';
import DetailsInfoItem from 'ui/shared/DetailsInfoItem';
import DetailsSponsoredItem from 'ui/shared/DetailsSponsoredItem';
import AddressEntity from 'ui/shared/entities/address/AddressEntity';
import BlockEntity from 'ui/shared/entities/block/BlockEntity';
import TxEntity from 'ui/shared/entities/tx/TxEntity';
Expand Down Expand Up @@ -213,7 +212,6 @@ const AddressDetails = ({ addressQuery, scrollRef }: Props) => {
/>
</DetailsInfoItem>
) }
<DetailsSponsoredItem isLoading={ addressQuery.isPlaceholderData }/>
</Grid>
</Box>
);
Expand Down
2 changes: 0 additions & 2 deletions ui/pages/Address.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ import AddressTokens from 'ui/address/AddressTokens';
import AddressTokenTransfers from 'ui/address/AddressTokenTransfers';
import AddressTxs from 'ui/address/AddressTxs';
import AddressWithdrawals from 'ui/address/AddressWithdrawals';
import TextAd from 'ui/shared/ad/TextAd';
import EntityTags from 'ui/shared/EntityTags';
import NetworkExplorers from 'ui/shared/NetworkExplorers';
import PageTitle from 'ui/shared/Page/PageTitle';
Expand Down Expand Up @@ -171,7 +170,6 @@ const AddressPageContent = () => {

return (
<>
<TextAd mb={ 6 }/>
<PageTitle
title={ `${ addressQuery.data?.is_contract ? 'Contract' : 'Address' } details` }
backLink={ backLink }
Expand Down
2 changes: 0 additions & 2 deletions ui/pages/Block.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ import { generateListStub } from 'stubs/utils';
import { WITHDRAWAL } from 'stubs/withdrawals';
import BlockDetails from 'ui/block/BlockDetails';
import BlockWithdrawals from 'ui/block/BlockWithdrawals';
import TextAd from 'ui/shared/ad/TextAd';
import NetworkExplorers from 'ui/shared/NetworkExplorers';
import PageTitle from 'ui/shared/Page/PageTitle';
import Pagination from 'ui/shared/pagination/Pagination';
Expand Down Expand Up @@ -115,7 +114,6 @@ const BlockPageContent = () => {

return (
<>
<TextAd mb={ 6 }/>
<PageTitle
title={ title }
backLink={ backLink }
Expand Down
2 changes: 0 additions & 2 deletions ui/pages/Home.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import ChainIndicators from 'ui/home/indicators/ChainIndicators';
import LatestBlocks from 'ui/home/LatestBlocks';
import Stats from 'ui/home/Stats';
import Transactions from 'ui/home/Transactions';
import AdBanner from 'ui/shared/ad/AdBanner';
import ProfileMenuDesktop from 'ui/snippets/profileMenu/ProfileMenuDesktop';
import SearchBar from 'ui/snippets/searchBar/SearchBar';

Expand Down Expand Up @@ -41,7 +40,6 @@ const Home = () => {
</Box>
<Stats/>
<ChainIndicators/>
<AdBanner mt={{ base: 6, lg: 8 }} mx="auto" display="flex" justifyContent="center"/>
<Flex mt={ 8 } direction={{ base: 'column', lg: 'row' }} columnGap={ 12 } rowGap={ 8 }>
<LatestBlocks/>
<Box flexGrow={ 1 }>
Expand Down
2 changes: 0 additions & 2 deletions ui/pages/Token.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ import * as addressStubs from 'stubs/address';
import * as tokenStubs from 'stubs/token';
import { generateListStub } from 'stubs/utils';
import AddressContract from 'ui/address/AddressContract';
import TextAd from 'ui/shared/ad/TextAd';
import * as TokenEntity from 'ui/shared/entities/token/TokenEntity';
import EntityTags from 'ui/shared/EntityTags';
import NetworkExplorers from 'ui/shared/NetworkExplorers';
Expand Down Expand Up @@ -265,7 +264,6 @@ const TokenPageContent = () => {

return (
<>
<TextAd mb={ 6 }/>
<PageTitle
title={ `${ tokenQuery.data?.name || 'Unnamed token' }${ tokenSymbolText }` }
isLoading={ tokenQuery.isPlaceholderData }
Expand Down
2 changes: 0 additions & 2 deletions ui/pages/TokenInstance.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ import * as regexp from 'lib/regexp';
import { TOKEN_INSTANCE } from 'stubs/token';
import * as tokenStubs from 'stubs/token';
import { generateListStub } from 'stubs/utils';
import TextAd from 'ui/shared/ad/TextAd';
import AddressHeadingInfo from 'ui/shared/AddressHeadingInfo';
import Tag from 'ui/shared/chakra/Tag';
import LinkExternal from 'ui/shared/LinkExternal';
Expand Down Expand Up @@ -168,7 +167,6 @@ const TokenInstanceContent = () => {

return (
<>
<TextAd mb={ 6 }/>
<PageTitle
title={ `${ tokenInstanceQuery.data?.token.name || 'Unnamed token' } #${ tokenInstanceQuery.data?.id }` }
backLink={ backLink }
Expand Down
2 changes: 0 additions & 2 deletions ui/pages/Transaction.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import { useAppContext } from 'lib/contexts/app';
import useIsMobile from 'lib/hooks/useIsMobile';
import getQueryParamString from 'lib/router/getQueryParamString';
import { TX } from 'stubs/tx';
import TextAd from 'ui/shared/ad/TextAd';
import EntityTags from 'ui/shared/EntityTags';
import NetworkExplorers from 'ui/shared/NetworkExplorers';
import PageTitle from 'ui/shared/Page/PageTitle';
Expand Down Expand Up @@ -69,7 +68,6 @@ const TransactionPageContent = () => {

return (
<>
<TextAd mb={ 6 }/>
<PageTitle
title="Transaction details"
backLink={ backLink }
Expand Down
43 changes: 0 additions & 43 deletions ui/shared/DetailsSponsoredItem.tsx

This file was deleted.

3 changes: 1 addition & 2 deletions ui/shared/Page/PageTitle.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import React from 'react';

import eastArrowIcon from 'icons/arrows/east.svg';
import useIsMobile from 'lib/hooks/useIsMobile';
import TextAd from 'ui/shared/ad/TextAd';
import LinkInternal from 'ui/shared/LinkInternal';

type BackLinkProp = { label: string; url: string } | { label: string; onClick: () => void };
Expand Down Expand Up @@ -52,6 +51,7 @@ const BackLink = (props: BackLinkProp & { isLoading?: boolean }) => {
);
};

// eslint-disable-next-line @typescript-eslint/no-unused-vars
const PageTitle = ({ title, contentAfter, withTextAd, backLink, className, isLoading, afterTitle, beforeTitle }: Props) => {
const tooltip = useDisclosure();
const isMobile = useIsMobile();
Expand Down Expand Up @@ -140,7 +140,6 @@ const PageTitle = ({ title, contentAfter, withTextAd, backLink, className, isLoa
{ afterTitle }
</Flex>
{ contentAfter }
{ withTextAd && <TextAd order={{ base: -1, lg: 100 }} mb={{ base: 6, lg: 0 }} ml="auto" w={{ base: '100%', lg: 'auto' }}/> }
</Flex>
);
};
Expand Down
45 changes: 0 additions & 45 deletions ui/shared/ad/AdBanner.tsx

This file was deleted.

57 changes: 0 additions & 57 deletions ui/shared/ad/AdbutlerBanner.tsx

This file was deleted.

30 changes: 0 additions & 30 deletions ui/shared/ad/CoinzillaBanner.tsx

This file was deleted.

Loading

0 comments on commit 4fbbd30

Please sign in to comment.