move ads in ClaimList behind SHOW_ADS config
This commit is contained in:
parent
e9b7d40456
commit
80d8eeb4cf
6 changed files with 10 additions and 5 deletions
|
@ -19,6 +19,7 @@ SITE_NAME=LBRY
|
||||||
SITE_DESCRIPTION=Meet LBRY, an open, free, and community-controlled content wonderland.
|
SITE_DESCRIPTION=Meet LBRY, an open, free, and community-controlled content wonderland.
|
||||||
LOGO_TITLE=lbry.tv
|
LOGO_TITLE=lbry.tv
|
||||||
SIMPLE_SITE=false
|
SIMPLE_SITE=false
|
||||||
|
SHOW_ADS=true
|
||||||
# OG
|
# OG
|
||||||
|
|
||||||
OG_TITLE_SUFFIX=| lbry.tv
|
OG_TITLE_SUFFIX=| lbry.tv
|
||||||
|
|
|
@ -23,6 +23,7 @@ const config = {
|
||||||
DEFAULT_LANGUAGE: process.env.DEFAULT_LANGUAGE,
|
DEFAULT_LANGUAGE: process.env.DEFAULT_LANGUAGE,
|
||||||
AUTO_FOLLOW_CHANNELS: process.env.AUTO_FOLLOW_CHANNELS,
|
AUTO_FOLLOW_CHANNELS: process.env.AUTO_FOLLOW_CHANNELS,
|
||||||
SIMPLE_SITE: process.env.SIMPLE_SITE === 'true',
|
SIMPLE_SITE: process.env.SIMPLE_SITE === 'true',
|
||||||
|
SHOW_ADS: process.env.SHOW_ADS === 'true',
|
||||||
PINNED_URI_1: process.env.PINNED_URI_1,
|
PINNED_URI_1: process.env.PINNED_URI_1,
|
||||||
PINNED_LABEL_1: process.env.PINNED_LABEL_1,
|
PINNED_LABEL_1: process.env.PINNED_LABEL_1,
|
||||||
PINNED_URI_2: process.env.PINNED_URI_2,
|
PINNED_URI_2: process.env.PINNED_URI_2,
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
// @flow
|
// @flow
|
||||||
|
import { SHOW_ADS } from 'config';
|
||||||
import * as CS from 'constants/claim_search';
|
import * as CS from 'constants/claim_search';
|
||||||
import * as ICONS from 'constants/icons';
|
import * as ICONS from 'constants/icons';
|
||||||
import React, { Fragment } from 'react';
|
import React, { Fragment } from 'react';
|
||||||
|
@ -126,7 +127,7 @@ function ChannelContent(props: Props) {
|
||||||
defaultOrderBy={CS.ORDER_BY_NEW}
|
defaultOrderBy={CS.ORDER_BY_NEW}
|
||||||
pageSize={defaultPageSize}
|
pageSize={defaultPageSize}
|
||||||
infiniteScroll={defaultInfiniteScroll}
|
infiniteScroll={defaultInfiniteScroll}
|
||||||
injectedItem={!isAuthenticated && IS_WEB && <Ads type="video" />}
|
injectedItem={SHOW_ADS && !isAuthenticated && IS_WEB && <Ads type="video" />}
|
||||||
meta={
|
meta={
|
||||||
<Form onSubmit={() => {}} className="wunderbar--inline">
|
<Form onSubmit={() => {}} className="wunderbar--inline">
|
||||||
<Icon icon={ICONS.SEARCH} />
|
<Icon icon={ICONS.SEARCH} />
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
// @flow
|
// @flow
|
||||||
|
import { SHOW_ADS } from 'config';
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import ClaimList from 'component/claimList';
|
import ClaimList from 'component/claimList';
|
||||||
import Ads from 'web/component/ads';
|
import Ads from 'web/component/ads';
|
||||||
|
@ -78,7 +79,7 @@ export default class RecommendedContent extends React.PureComponent<Props> {
|
||||||
type="small"
|
type="small"
|
||||||
loading={isSearching}
|
loading={isSearching}
|
||||||
uris={recommendedContent}
|
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')}
|
empty={__('No related content found')}
|
||||||
/>
|
/>
|
||||||
</WaitUntilOnPage>
|
</WaitUntilOnPage>
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
// @flow
|
// @flow
|
||||||
|
import { SHOW_ADS } from 'config';
|
||||||
import * as ICONS from 'constants/icons';
|
import * as ICONS from 'constants/icons';
|
||||||
import React, { useRef } from 'react';
|
import React, { useRef } from 'react';
|
||||||
import Page from 'component/page';
|
import Page from 'component/page';
|
||||||
|
@ -94,7 +95,7 @@ function DiscoverPage(props: Props) {
|
||||||
tags={tags}
|
tags={tags}
|
||||||
hiddenNsfwMessage={<HiddenNsfw type="page" />}
|
hiddenNsfwMessage={<HiddenNsfw type="page" />}
|
||||||
repostedClaimId={repostedClaim ? repostedClaim.claim_id : null}
|
repostedClaimId={repostedClaim ? repostedClaim.claim_id : null}
|
||||||
injectedItem={!isAuthenticated && IS_WEB && <Ads type="video" />}
|
injectedItem={SHOW_ADS && !isAuthenticated && IS_WEB && <Ads type="video" />}
|
||||||
meta={
|
meta={
|
||||||
tag &&
|
tag &&
|
||||||
!isMobile && (
|
!isMobile && (
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
// @flow
|
// @flow
|
||||||
import { SIMPLE_SITE } from 'config';
|
import { SIMPLE_SITE, SHOW_ADS } from 'config';
|
||||||
import * as ICONS from 'constants/icons';
|
import * as ICONS from 'constants/icons';
|
||||||
import * as PAGES from 'constants/pages';
|
import * as PAGES from 'constants/pages';
|
||||||
import React, { useEffect, Fragment } from 'react';
|
import React, { useEffect, Fragment } from 'react';
|
||||||
|
@ -118,7 +118,7 @@ export default function SearchPage(props: Props) {
|
||||||
uris={uris}
|
uris={uris}
|
||||||
loading={isSearching}
|
loading={isSearching}
|
||||||
header={<SearchOptions additionalOptions={additionalOptions} />}
|
header={<SearchOptions additionalOptions={additionalOptions} />}
|
||||||
injectedItem={!isAuthenticated && IS_WEB && <Ads type="video" />}
|
injectedItem={SHOW_ADS && !isAuthenticated && IS_WEB && <Ads type="video" />}
|
||||||
headerAltControls={
|
headerAltControls={
|
||||||
<Fragment>
|
<Fragment>
|
||||||
<span>{__('Find what you were looking for?')}</span>
|
<span>{__('Find what you were looking for?')}</span>
|
||||||
|
|
Loading…
Add table
Reference in a new issue