From 920504f37e75f3d8b9148a9e004f54f49ab8c7a3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rave=20=7C=20=E5=9B=B3=E6=9B=B8=E9=A4=A8=E7=8C=AB?= Date: Mon, 5 Aug 2024 20:18:55 +0200 Subject: [PATCH] Remove ad injections & premium checks --- ui/component/recommendedContent/index.js | 2 - ui/component/recommendedContent/view.jsx | 40 ------------------- ui/component/sideNavigation/view.jsx | 9 ----- .../channelPage/tabs/contentTab/index.js | 2 - .../channelPage/tabs/contentTab/view.jsx | 14 ------- .../homeTab/internal/homeTabSection/index.js | 5 +-- .../homeTab/internal/homeTabSection/view.jsx | 13 ------ .../internal/markdownPost/index.js | 6 +-- .../internal/markdownPost/view.jsx | 4 -- .../internal/videoPlayers/index.js | 6 +-- .../internal/videoPlayers/view.jsx | 5 --- ui/page/home/index.js | 3 +- ui/page/home/view.jsx | 9 ----- ui/page/portal/index.js | 2 - ui/page/portal/view.jsx | 9 +---- ui/page/search/index.js | 3 -- ui/page/search/view.jsx | 10 +---- 17 files changed, 6 insertions(+), 136 deletions(-) diff --git a/ui/component/recommendedContent/index.js b/ui/component/recommendedContent/index.js index 93926720ea..d5b5b8e4ed 100644 --- a/ui/component/recommendedContent/index.js +++ b/ui/component/recommendedContent/index.js @@ -3,7 +3,6 @@ import { withRouter } from 'react-router'; import { selectClaimForUri } from 'redux/selectors/claims'; import { doFetchRecommendedContent } from 'redux/actions/search'; import { selectRecommendedContentForUri, selectIsSearching } from 'redux/selectors/search'; -import { selectUserHasOdyseePremiumPlus } from 'redux/selectors/memberships'; import RecommendedContent from './view'; import { selectClientSetting } from 'redux/selectors/settings'; import * as SETTINGS from 'constants/settings'; @@ -18,7 +17,6 @@ const select = (state, props) => { nextRecommendedUri, isSearching: selectIsSearching(state), searchInLanguage: selectClientSetting(state, SETTINGS.SEARCH_IN_LANGUAGE), - hasPremiumPlus: selectUserHasOdyseePremiumPlus(state), }; }; diff --git a/ui/component/recommendedContent/view.jsx b/ui/component/recommendedContent/view.jsx index 43ce8f34a7..d87dcfe99f 100644 --- a/ui/component/recommendedContent/view.jsx +++ b/ui/component/recommendedContent/view.jsx @@ -1,11 +1,9 @@ // @flow import { v4 as Uuidv4 } from 'uuid'; -import { SHOW_ADS, AD_KEYWORD_BLOCKLIST, AD_KEYWORD_BLOCKLIST_CHECK_DESCRIPTION } from 'config'; import React from 'react'; import ClaimList from 'component/claimList'; import ClaimListDiscover from 'component/claimListDiscover'; import ClaimPreview from 'component/claimPreview'; -import Ad from 'web/component/ad'; import Card from 'component/common/card'; import { useIsMobile, useIsMediumScreen } from 'effects/use-screensize'; import Button from 'component/button'; @@ -13,13 +11,10 @@ import { FYP_ID } from 'constants/urlParams'; import classnames from 'classnames'; import RecSys from 'recsys'; import LangFilterIndicator from 'component/langFilterIndicator'; -import { getClaimMetadata } from 'util/claim'; import './style.scss'; const VIEW_ALL_RELATED = 'view_all_related'; const VIEW_MORE_FROM = 'view_more_from'; -const BLOCKED_WORDS: ?Array = AD_KEYWORD_BLOCKLIST && AD_KEYWORD_BLOCKLIST.toLowerCase().split(','); -const CHECK_DESCRIPTION: boolean = AD_KEYWORD_BLOCKLIST_CHECK_DESCRIPTION === 'true'; type Props = { uri: string, @@ -32,7 +27,6 @@ type Props = { claimId: string, metadata: any, location: UrlLocation, - hasPremiumPlus: boolean, }; export default React.memo(function RecommendedContent(props: Props) { @@ -45,33 +39,9 @@ export default React.memo(function RecommendedContent(props: Props) { searchInLanguage, claim, location, - hasPremiumPlus, } = props; const claimId: ?string = claim && claim.claim_id; - const injectAds = SHOW_ADS && IS_WEB && !hasPremiumPlus; - - function claimContainsBlockedWords(claim: ?StreamClaim) { - if (BLOCKED_WORDS) { - const hasBlockedWords = (str) => BLOCKED_WORDS.some((bw) => str.includes(bw)); - const metadata = getClaimMetadata(claim); - // $FlowFixMe - flow does not support chaining yet, but we know for sure these fields are '?string'. - const title = metadata?.title?.toLowerCase(); - // $FlowFixMe - const description = metadata?.description?.toLowerCase(); - // $FlowFixMe - const name = claim?.name?.toLowerCase(); - - return Boolean( - (title && hasBlockedWords(title)) || - (name && hasBlockedWords(name)) || - (CHECK_DESCRIPTION && description && hasBlockedWords(description)) - ); - } - return false; - } - - const blacklistTriggered = React.useMemo(() => injectAds && claimContainsBlockedWords(claim), [injectAds, claim]); const [viewMode, setViewMode] = React.useState(VIEW_ALL_RELATED); const signingChannel = claim && claim.signing_channel; @@ -80,14 +50,6 @@ export default React.memo(function RecommendedContent(props: Props) { const isMedium = useIsMediumScreen(); const { onRecsLoaded: onRecommendationsLoaded, onClickedRecommended: onRecommendationClicked } = RecSys; - const InjectedAd = - injectAds && !blacklistTriggered && !hasPremiumPlus - ? { - node: , - index: isMobile ? 0 : 3, - } - : null; - // Assume this component always resides in a page where the `uri` matches // e.g. never in a floating popup. With that, we can grab the FYP ID from // the search param directly. Otherwise, the parent component would need to @@ -165,7 +127,6 @@ export default React.memo(function RecommendedContent(props: Props) { type="small" loading={isSearching} uris={recommendedContentUris} - injectedItem={InjectedAd} empty={__('No related content found')} onClick={handleRecommendationClicked} /> @@ -183,7 +144,6 @@ export default React.memo(function RecommendedContent(props: Props) { hideFilters channelIds={[signingChannel.claim_id]} loading={isSearching} - injectedItem={InjectedAd} empty={__('No related content found')} /> )} diff --git a/ui/component/sideNavigation/view.jsx b/ui/component/sideNavigation/view.jsx index d330bfaa1a..42aed02e94 100644 --- a/ui/component/sideNavigation/view.jsx +++ b/ui/component/sideNavigation/view.jsx @@ -513,15 +513,6 @@ function SideNavigation(props: Props) { gdprDiv.style.display = 'none'; } } - - const ad = document.getElementById('rmbl-sticky') || document.getElementById('sticky-d-rc'); - if (ad) { - if (!sidebarOpen || isMobile) { - ad.classList.remove('LEFT'); - } else { - ad.classList.add('LEFT'); - } - } }, [sidebarOpen, isMobile]); React.useEffect(() => { diff --git a/ui/page/claim/internal/claimPageComponent/internal/channelPage/tabs/contentTab/index.js b/ui/page/claim/internal/claimPageComponent/internal/channelPage/tabs/contentTab/index.js index dff4729ce2..4f2a3c4649 100644 --- a/ui/page/claim/internal/claimPageComponent/internal/channelPage/tabs/contentTab/index.js +++ b/ui/page/claim/internal/claimPageComponent/internal/channelPage/tabs/contentTab/index.js @@ -7,7 +7,6 @@ import { makeSelectTotalPagesInChannelSearch, selectClaimForUri, } from 'redux/selectors/claims'; -import { selectUserHasOdyseePremiumPlus } from 'redux/selectors/memberships'; import { doResolveUris } from 'redux/actions/claims'; import * as SETTINGS from 'constants/settings'; import { makeSelectChannelIsMuted } from 'redux/selectors/blocked'; @@ -37,7 +36,6 @@ const select = (state, props) => { hideShorts: selectClientSetting(state, SETTINGS.HIDE_SHORTS), activeLivestreamForChannel: selectActiveLivestreamForChannel(state, channelClaimId), adBlockerFound: selectAdBlockerFound(state), - hasPremiumPlus: selectUserHasOdyseePremiumPlus(state), }; }; diff --git a/ui/page/claim/internal/claimPageComponent/internal/channelPage/tabs/contentTab/view.jsx b/ui/page/claim/internal/claimPageComponent/internal/channelPage/tabs/contentTab/view.jsx index 8a052d248c..096e9d1628 100644 --- a/ui/page/claim/internal/claimPageComponent/internal/channelPage/tabs/contentTab/view.jsx +++ b/ui/page/claim/internal/claimPageComponent/internal/channelPage/tabs/contentTab/view.jsx @@ -17,7 +17,6 @@ import { ClaimSearchFilterContext } from 'contexts/claimSearchFilterContext'; import { SearchResults } from './internal/searchResults'; import { useIsLargeScreen } from 'effects/use-screensize'; import usePersistedState from 'effects/use-persisted-state'; -import Ad from 'web/component/ad'; import { tagSearchCsOptionsHook } from 'util/search'; import { lazyImport } from 'util/lazyImport'; @@ -50,7 +49,6 @@ type Props = { claimType: string, empty?: string, activeLivestreamForChannel: ?LivestreamActiveClaim, - hasPremiumPlus: boolean, }; function ContentTab(props: Props) { @@ -72,7 +70,6 @@ function ContentTab(props: Props) { claimType, empty, activeLivestreamForChannel, - hasPremiumPlus, } = props; const claimsInChannel = 9999; @@ -187,17 +184,6 @@ function ContentTab(props: Props) { defaultOrderBy={filters ? filters.order_by : CS.ORDER_BY_NEW} pageSize={dynamicPageSize} infiniteScroll={defaultInfiniteScroll} - injectedItem={ - !hasPremiumPlus && { - node: (index, lastVisibleIndex, pageSize) => { - if (pageSize && index < pageSize) { - return index === lastVisibleIndex ? : null; - } else { - return index % (pageSize * 2) === 0 ? : null; - } - }, - } - } meta={ showFilters && (
{}} className="wunderbar--inline"> diff --git a/ui/page/claim/internal/claimPageComponent/internal/channelPage/tabs/homeTab/internal/homeTabSection/index.js b/ui/page/claim/internal/claimPageComponent/internal/channelPage/tabs/homeTab/internal/homeTabSection/index.js index 4f3d30c27e..b4eabf7e85 100644 --- a/ui/page/claim/internal/claimPageComponent/internal/channelPage/tabs/homeTab/internal/homeTabSection/index.js +++ b/ui/page/claim/internal/claimPageComponent/internal/channelPage/tabs/homeTab/internal/homeTabSection/index.js @@ -15,14 +15,12 @@ import { selectClaimIdsForCollectionId, } from 'redux/selectors/collections'; import { SECTION_TAGS } from 'constants/collections'; -import { selectUserHasOdyseePremiumPlus } from 'redux/selectors/memberships'; import { selectFeaturedChannelsForChannelId } from 'redux/selectors/comments'; import { CsOptHelper } from 'util/claim-search'; import HomeTabSection from './view'; import * as CS from 'constants/claim_search'; const select = (state, props) => { - const hasPremiumPlus = selectUserHasOdyseePremiumPlus(state); const stream_types = props.section.file_type && Array.isArray(props.section.file_type) ? props.section.file_type @@ -32,7 +30,7 @@ const select = (state, props) => { const claimType = props.section.type === 'playlists' ? 'collection' : props.section.type === 'reposts' ? 'repost' : 'stream'; const options = { - page_size: props.section.type !== 'featured' ? (hasPremiumPlus ? 12 : 11) : 1, + page_size: props.section.type !== 'featured' ? 12 : 1, page: 1, channel_ids: [props.channelClaimId], stream_types: props.section.type !== 'reposts' ? stream_types : undefined, @@ -81,7 +79,6 @@ const select = (state, props) => { props.section.type === 'featured' && props.section.claim_id && selectClaimUriForId(state, props.section.claim_id), featuredChannels: selectFeaturedChannelsForChannelId(state, props.channelClaimId), activeLivestreamUri: activeLivestream?.uri, - hasPremiumPlus, }; }; diff --git a/ui/page/claim/internal/claimPageComponent/internal/channelPage/tabs/homeTab/internal/homeTabSection/view.jsx b/ui/page/claim/internal/claimPageComponent/internal/channelPage/tabs/homeTab/internal/homeTabSection/view.jsx index 23b9b04804..af71e1ff8c 100644 --- a/ui/page/claim/internal/claimPageComponent/internal/channelPage/tabs/homeTab/internal/homeTabSection/view.jsx +++ b/ui/page/claim/internal/claimPageComponent/internal/channelPage/tabs/homeTab/internal/homeTabSection/view.jsx @@ -7,7 +7,6 @@ import { DEBOUNCE_WAIT_DURATION_MS, SEARCH_PAGE_SIZE } from 'constants/search'; import ChannelSection from 'component/channelSections/Section'; import UpcomingClaims from 'component/upcomingClaims'; import ClaimPreviewTile from 'component/claimPreviewTile'; -import Ad from 'web/component/ad'; import { lighthouse } from 'redux/actions/search'; import * as CS from 'constants/claim_search'; import Icon from 'component/common/icon'; @@ -35,7 +34,6 @@ type Props = { singleClaimUri: string, featuredChannels: any, activeLivestreamUri: ?ClaimUri, - hasPremiumPlus: boolean, // --- perform --- doClaimSearch: (ClaimSearchOptions, ?DoClaimSearchSettings) => Promise, doResolveClaimId: (claimId: string) => void, @@ -47,7 +45,6 @@ function HomeTabSection(props: Props) { const { channelClaimId, index, - topContentGridIndex, section, editMode, hasFeaturedContent, @@ -62,7 +59,6 @@ function HomeTabSection(props: Props) { fetchingClaimSearch, publishedCollections, singleClaimUri, - hasPremiumPlus, featuredChannels, activeLivestreamUri, doClaimSearch, @@ -79,7 +75,6 @@ function HomeTabSection(props: Props) { const maxClaimsInSection = 12; const windowSize = useWindowSize(); - const maxTilesPerRow = windowSize >= 1600 ? 6 : windowSize > 1150 ? 4 : windowSize > 900 ? 3 : 2; const maxChannelsPerRow = windowSize >= 1150 ? 8 : windowSize > 900 ? 6 : 3; const featuredChannel = featuredChannels && featuredChannels.find((list) => list.id === section.claim_id); const hasFeaturedClaim = singleClaimUri || (claimSearchResults && claimSearchResults[0]) || section.claim_id; @@ -425,14 +420,6 @@ function HomeTabSection(props: Props) { uris={collectionUrls || claimSearchResults} maxClaimRender={maxClaimsInSection} claimIds={collectionClaimIds} - injectedItem={ - !hasPremiumPlus && - index === topContentGridIndex && { - node: (index) => { - return index === maxTilesPerRow ? : null; - }, - } - } /> ) : featuredChannel && ( diff --git a/ui/page/claim/internal/claimPageComponent/internal/streamClaimPage/internal/markdownPost/index.js b/ui/page/claim/internal/claimPageComponent/internal/streamClaimPage/internal/markdownPost/index.js index 0f0fbd98e8..0badd416ac 100644 --- a/ui/page/claim/internal/claimPageComponent/internal/streamClaimPage/internal/markdownPost/index.js +++ b/ui/page/claim/internal/claimPageComponent/internal/streamClaimPage/internal/markdownPost/index.js @@ -4,10 +4,7 @@ import { LINKED_COMMENT_QUERY_PARAM, THREAD_COMMENT_QUERY_PARAM } from 'constant import { selectCommentsDisabledSettingForChannelId } from 'redux/selectors/comments'; import { selectClaimIsNsfwForUri, selectClaimForUri } from 'redux/selectors/claims'; -import { - selectUserHasOdyseePremiumPlus, - selectNoRestrictionOrUserIsMemberForContentClaimId, -} from 'redux/selectors/memberships'; +import { selectNoRestrictionOrUserIsMemberForContentClaimId } from 'redux/selectors/memberships'; import { getChannelIdFromClaim } from 'util/claim'; import MarkdownPostPage from './view'; @@ -27,7 +24,6 @@ const select = (state, props) => { threadCommentId: urlParams.get(THREAD_COMMENT_QUERY_PARAM), contentUnlocked: claimId && selectNoRestrictionOrUserIsMemberForContentClaimId(state, claimId), commentSettingDisabled: selectCommentsDisabledSettingForChannelId(state, getChannelIdFromClaim(claim)), - hasPremiumPlus: selectUserHasOdyseePremiumPlus(state), }; }; diff --git a/ui/page/claim/internal/claimPageComponent/internal/streamClaimPage/internal/markdownPost/view.jsx b/ui/page/claim/internal/claimPageComponent/internal/streamClaimPage/internal/markdownPost/view.jsx index e083c40c8b..700a265152 100644 --- a/ui/page/claim/internal/claimPageComponent/internal/streamClaimPage/internal/markdownPost/view.jsx +++ b/ui/page/claim/internal/claimPageComponent/internal/streamClaimPage/internal/markdownPost/view.jsx @@ -1,6 +1,5 @@ // @flow import * as React from 'react'; -import Ad from 'web/component/ad'; import Empty from 'component/common/empty'; import FileTitleSection from 'component/fileTitleSection'; import { lazyImport } from 'util/lazyImport'; @@ -17,7 +16,6 @@ type Props = { threadCommentId?: string, commentSettingDisabled: ?boolean, contentUnlocked: boolean, - hasPremiumPlus: boolean, }; export default function MarkdownPostPage(props: Props) { @@ -30,7 +28,6 @@ export default function MarkdownPostPage(props: Props) { threadCommentId, commentSettingDisabled, contentUnlocked, - hasPremiumPlus, } = props; if (isMature) { @@ -54,7 +51,6 @@ export default function MarkdownPostPage(props: Props) { ) : contentUnlocked ? ( - {!hasPremiumPlus && } { videoTheaterMode: selectClientSetting(state, SETTINGS.VIDEO_THEATER_MODE), contentUnlocked: claimId && selectNoRestrictionOrUserIsMemberForContentClaimId(state, claimId), isAutoplayCountdownForUri: selectIsAutoplayCountdownForUri(state, uri), - hasPremiumPlus: selectUserHasOdyseePremiumPlus(state), }; }; diff --git a/ui/page/claim/internal/claimPageComponent/internal/streamClaimPage/internal/videoPlayers/view.jsx b/ui/page/claim/internal/claimPageComponent/internal/streamClaimPage/internal/videoPlayers/view.jsx index 42d6b6c391..2d67a1274b 100644 --- a/ui/page/claim/internal/claimPageComponent/internal/streamClaimPage/internal/videoPlayers/view.jsx +++ b/ui/page/claim/internal/claimPageComponent/internal/streamClaimPage/internal/videoPlayers/view.jsx @@ -12,7 +12,6 @@ import RecommendedContent from 'component/recommendedContent'; import Empty from 'component/common/empty'; import SwipeableDrawer from 'component/swipeableDrawer'; import DrawerExpandButton from 'component/swipeableDrawerExpand'; -import Ad from 'web/component/ad'; import { useIsMobile, useIsMobileLandscape, useIsMediumScreen } from 'effects/use-screensize'; const CommentsList = lazyImport(() => import('component/commentsList' /* webpackChunkName: "comments" */)); @@ -40,7 +39,6 @@ type Props = { contentUnlocked: boolean, isAutoplayCountdownForUri: ?boolean, clearPosition: (uri: string) => void, - hasPremiumPlus: boolean, }; export default function VideoPlayersPage(props: Props) { @@ -63,7 +61,6 @@ export default function VideoPlayersPage(props: Props) { contentUnlocked, isAutoplayCountdownForUri, clearPosition, - hasPremiumPlus, } = props; const isMobile = useIsMobile(); @@ -146,7 +143,6 @@ export default function VideoPlayersPage(props: Props) { ) : isMobile && !isLandscapeRotated ? ( - {!hasPremiumPlus && } {commentsListTitle}}> @@ -157,7 +153,6 @@ export default function VideoPlayersPage(props: Props) { ) : ( - {!hasPremiumPlus && } ))} diff --git a/ui/page/home/index.js b/ui/page/home/index.js index 17908488c7..a90c12881a 100644 --- a/ui/page/home/index.js +++ b/ui/page/home/index.js @@ -9,7 +9,7 @@ import { } from 'redux/selectors/livestream'; import { selectFollowedTags } from 'redux/selectors/tags'; import { selectHomepageFetched, selectUserVerifiedEmail } from 'redux/selectors/user'; -import { selectUserHasValidOdyseeMembership, selectUserHasOdyseePremiumPlus } from 'redux/selectors/memberships'; +import { selectUserHasValidOdyseeMembership } from 'redux/selectors/memberships'; import { selectSubscriptionIds } from 'redux/selectors/subscriptions'; import { selectShowMatureContent, @@ -32,7 +32,6 @@ const select = (state) => ({ hideScheduledLivestreams: selectClientSetting(state, SETTINGS.HIDE_SCHEDULED_LIVESTREAMS), homepageOrder: selectClientSetting(state, SETTINGS.HOMEPAGE_ORDER), userHasOdyseeMembership: selectUserHasValidOdyseeMembership(state), - hasPremiumPlus: selectUserHasOdyseePremiumPlus(state), activeLivestreamByCreatorId: selectActiveLivestreamByCreatorId(state), livestreamViewersById: selectViewersById(state), }); diff --git a/ui/page/home/view.jsx b/ui/page/home/view.jsx index daf98208a7..25e9760813 100644 --- a/ui/page/home/view.jsx +++ b/ui/page/home/view.jsx @@ -20,7 +20,6 @@ import { useIsLargeScreen } from 'effects/use-screensize'; import { GetLinksData } from 'util/buildHomepage'; import { filterActiveLivestreamUris } from 'util/livestream'; import UpcomingClaims from 'component/upcomingClaims'; -import Ad from 'web/component/ad'; import Meme from 'web/component/meme'; import { useHistory } from 'react-router-dom'; @@ -42,7 +41,6 @@ type Props = { homepageOrder: HomepageOrder, doOpenModal: (id: string, ?{}) => void, userHasOdyseeMembership: ?boolean, - hasPremiumPlus: boolean, currentTheme: string, activeLivestreamByCreatorId: LivestreamByCreatorId, livestreamViewersById: LivestreamViewersById, @@ -63,7 +61,6 @@ function HomePage(props: Props) { homepageOrder, doOpenModal, userHasOdyseeMembership, - hasPremiumPlus, activeLivestreamByCreatorId: al, // yup, unreadable name, but we are just relaying here. livestreamViewersById: lv, } = props; @@ -213,12 +210,6 @@ function HomePage(props: Props) { hasSource prefixUris={cache[id].livestreamUris} pins={{ urls: pinUrls, claimIds: pinnedClaimIds }} - injectedItem={ - index === cache.topGrid && - !hasPremiumPlus && { - node: , - } - } forceShowReposts={id !== 'FOLLOWING'} loading={id === 'FOLLOWING' ? fetchingActiveLivestreams : false} /> diff --git a/ui/page/portal/index.js b/ui/page/portal/index.js index 28fc2a05de..733fd96363 100644 --- a/ui/page/portal/index.js +++ b/ui/page/portal/index.js @@ -1,7 +1,6 @@ import { connect } from 'react-redux'; import { selectHomepageData } from 'redux/selectors/settings'; import { selectUser } from 'redux/selectors/user'; -import { selectUserHasOdyseePremiumPlus } from 'redux/selectors/memberships'; import PortalPage from './view'; const select = (state) => { @@ -16,7 +15,6 @@ const select = (state) => { homepageData, portals: mainPortal?.portals, showViews, - hasPremiumPlus: selectUserHasOdyseePremiumPlus(state), }; }; diff --git a/ui/page/portal/view.jsx b/ui/page/portal/view.jsx index 1390adbb70..99e2c73890 100644 --- a/ui/page/portal/view.jsx +++ b/ui/page/portal/view.jsx @@ -4,7 +4,6 @@ import Page from 'component/page'; import { useParams } from 'react-router-dom'; import ClaimListDiscover from 'component/claimListDiscover'; import { lazyImport } from 'util/lazyImport'; -import Ad from 'web/component/ad'; import './style.scss'; const Portals = lazyImport(() => import('component/portals' /* webpackChunkName: "portals" */)); @@ -13,13 +12,12 @@ type Props = { portals: any, homepageData: any, showViews: boolean, - hasPremiumPlus: boolean, }; export const PortalContext = React.createContext(); function PortalPage(props: Props) { - const { portals, homepageData, showViews, hasPremiumPlus } = props; + const { portals, homepageData, showViews } = props; const [portal, setIndex] = React.useState(undefined); const [displayedTiles, setDisplayedTiles] = React.useState(0); @@ -67,11 +65,6 @@ function PortalPage(props: Props) { showHeader={false} loadedCallback={setDisplayedTiles} fetchViewCount={showViews} - injectedItem={ - !hasPremiumPlus && { - node: , - } - } /> {homepageData && displayedTiles >= portal.claimIds.videos.length - 3 && ( diff --git a/ui/page/search/index.js b/ui/page/search/index.js index 54c570db79..41e989deb5 100644 --- a/ui/page/search/index.js +++ b/ui/page/search/index.js @@ -9,14 +9,12 @@ import { } from 'redux/selectors/search'; import { selectClientSetting, selectLanguage, selectShowMatureContent } from 'redux/selectors/settings'; import { getSearchQueryString } from 'util/query-params'; -import { selectUserHasOdyseePremiumPlus } from 'redux/selectors/memberships'; import SearchPage from './view'; import * as SETTINGS from 'constants/settings'; const select = (state, props) => { const showMature = selectShowMatureContent(state); const urlParams = new URLSearchParams(props.location.search); - const hasPremiumPlus = selectUserHasOdyseePremiumPlus(state); const languageSetting = selectLanguage(state); const searchInLanguage = selectClientSetting(state, SETTINGS.SEARCH_IN_LANGUAGE); @@ -42,7 +40,6 @@ const select = (state, props) => { isSearching: selectIsSearching(state), uris: uris, hasReachedMaxResultsLength: hasReachedMaxResultsLength, - hasPremiumPlus: hasPremiumPlus, }; }; diff --git a/ui/page/search/view.jsx b/ui/page/search/view.jsx index 765623d0fb..54ffc2b00b 100644 --- a/ui/page/search/view.jsx +++ b/ui/page/search/view.jsx @@ -7,7 +7,6 @@ import ClaimList from 'component/claimList'; import Page from 'component/page'; import SearchOptions from 'component/searchOptions'; import SearchTopClaim from 'component/searchTopClaim'; -import Ad from 'web/component/ad'; import { formatLbryUrlForWeb } from 'util/url'; import { useHistory } from 'react-router'; import { SEARCH_PAGE_SIZE } from 'constants/search'; @@ -20,11 +19,10 @@ type Props = { uris: Array, isAuthenticated: boolean, hasReachedMaxResultsLength: boolean, - hasPremiumPlus: boolean, }; export default function SearchPage(props: Props) { - const { urlQuery, searchOptions, search, uris, isSearching, hasReachedMaxResultsLength, hasPremiumPlus } = props; + const { urlQuery, searchOptions, search, uris, isSearching, hasReachedMaxResultsLength } = props; const { push } = useHistory(); const [from, setFrom] = React.useState(0); const [currentUrlQuery, setCurrentUrlQuery] = React.useState(urlQuery); @@ -104,12 +102,6 @@ export default function SearchPage(props: Props) { header={ } - injectedItem={ - !hasPremiumPlus && { - node: , - index: 3, - } - } />
{__('These search results are provided by Odysee.')}