move ads in ClaimList behind SHOW_ADS config

This commit is contained in:
Sean Yesmunt 2020-08-03 16:14:43 -04:00
parent e9b7d40456
commit 80d8eeb4cf
6 changed files with 10 additions and 5 deletions

View file

@ -19,6 +19,7 @@ SITE_NAME=LBRY
SITE_DESCRIPTION=Meet LBRY, an open, free, and community-controlled content wonderland.
LOGO_TITLE=lbry.tv
SIMPLE_SITE=false
SHOW_ADS=true
# OG
OG_TITLE_SUFFIX=| lbry.tv

View file

@ -23,6 +23,7 @@ const config = {
DEFAULT_LANGUAGE: process.env.DEFAULT_LANGUAGE,
AUTO_FOLLOW_CHANNELS: process.env.AUTO_FOLLOW_CHANNELS,
SIMPLE_SITE: process.env.SIMPLE_SITE === 'true',
SHOW_ADS: process.env.SHOW_ADS === 'true',
PINNED_URI_1: process.env.PINNED_URI_1,
PINNED_LABEL_1: process.env.PINNED_LABEL_1,
PINNED_URI_2: process.env.PINNED_URI_2,

View file

@ -1,4 +1,5 @@
// @flow
import { SHOW_ADS } from 'config';
import * as CS from 'constants/claim_search';
import * as ICONS from 'constants/icons';
import React, { Fragment } from 'react';
@ -126,7 +127,7 @@ function ChannelContent(props: Props) {
defaultOrderBy={CS.ORDER_BY_NEW}
pageSize={defaultPageSize}
infiniteScroll={defaultInfiniteScroll}
injectedItem={!isAuthenticated && IS_WEB && <Ads type="video" />}
injectedItem={SHOW_ADS && !isAuthenticated && IS_WEB && <Ads type="video" />}
meta={
<Form onSubmit={() => {}} className="wunderbar--inline">
<Icon icon={ICONS.SEARCH} />

View file

@ -1,4 +1,5 @@
// @flow
import { SHOW_ADS } from 'config';
import React from 'react';
import ClaimList from 'component/claimList';
import Ads from 'web/component/ads';
@ -78,7 +79,7 @@ export default class RecommendedContent extends React.PureComponent<Props> {
type="small"
loading={isSearching}
uris={recommendedContent}
injectedItem={!isAuthenticated && IS_WEB && <Ads type="video" small />}
injectedItem={SHOW_ADS && !isAuthenticated && IS_WEB && <Ads type="video" small />}
empty={__('No related content found')}
/>
</WaitUntilOnPage>

View file

@ -1,4 +1,5 @@
// @flow
import { SHOW_ADS } from 'config';
import * as ICONS from 'constants/icons';
import React, { useRef } from 'react';
import Page from 'component/page';
@ -94,7 +95,7 @@ function DiscoverPage(props: Props) {
tags={tags}
hiddenNsfwMessage={<HiddenNsfw type="page" />}
repostedClaimId={repostedClaim ? repostedClaim.claim_id : null}
injectedItem={!isAuthenticated && IS_WEB && <Ads type="video" />}
injectedItem={SHOW_ADS && !isAuthenticated && IS_WEB && <Ads type="video" />}
meta={
tag &&
!isMobile && (

View file

@ -1,5 +1,5 @@
// @flow
import { SIMPLE_SITE } from 'config';
import { SIMPLE_SITE, SHOW_ADS } from 'config';
import * as ICONS from 'constants/icons';
import * as PAGES from 'constants/pages';
import React, { useEffect, Fragment } from 'react';
@ -118,7 +118,7 @@ export default function SearchPage(props: Props) {
uris={uris}
loading={isSearching}
header={<SearchOptions additionalOptions={additionalOptions} />}
injectedItem={!isAuthenticated && IS_WEB && <Ads type="video" />}
injectedItem={SHOW_ADS && !isAuthenticated && IS_WEB && <Ads type="video" />}
headerAltControls={
<Fragment>
<span>{__('Find what you were looking for?')}</span>