From d20e4ad0e7674f53f3c582792881eef26d490579 Mon Sep 17 00:00:00 2001 From: zeppi Date: Tue, 19 Oct 2021 15:24:42 -0400 Subject: [PATCH] remove more web folder stuff --- ui/component/recommendedContent/index.js | 2 - ui/component/recommendedContent/view.jsx | 7 - ui/component/syncFatalError/view.jsx | 15 +-- web/component/ads/index.js | 11 -- web/component/ads/view.jsx | 123 ------------------ web/component/footer.jsx | 39 ------ web/component/meme.jsx | 13 -- web/component/nag-data-collection.jsx | 62 --------- web/component/nag-degraded-performance.jsx | 34 ----- web/component/nag-no-user.jsx | 24 ---- web/component/nag-sunset.jsx | 38 ------ web/component/openInAppLink/index.js | 9 -- web/component/openInAppLink/view.jsx | 100 -------------- web/component/pixel/index.js | 9 -- web/component/pixel/view.jsx | 42 ------ web/component/youtubeReferralWelcome/index.js | 12 -- web/component/youtubeReferralWelcome/view.jsx | 24 ---- 17 files changed, 1 insertion(+), 563 deletions(-) delete mode 100644 web/component/ads/index.js delete mode 100644 web/component/ads/view.jsx delete mode 100644 web/component/footer.jsx delete mode 100644 web/component/meme.jsx delete mode 100644 web/component/nag-data-collection.jsx delete mode 100644 web/component/nag-degraded-performance.jsx delete mode 100644 web/component/nag-no-user.jsx delete mode 100644 web/component/nag-sunset.jsx delete mode 100644 web/component/openInAppLink/index.js delete mode 100644 web/component/openInAppLink/view.jsx delete mode 100644 web/component/pixel/index.js delete mode 100644 web/component/pixel/view.jsx delete mode 100644 web/component/youtubeReferralWelcome/index.js delete mode 100644 web/component/youtubeReferralWelcome/view.jsx diff --git a/ui/component/recommendedContent/index.js b/ui/component/recommendedContent/index.js index 2eed9f940..af9d516c0 100644 --- a/ui/component/recommendedContent/index.js +++ b/ui/component/recommendedContent/index.js @@ -2,7 +2,6 @@ import { connect } from 'react-redux'; import { makeSelectClaimForUri } from 'redux/selectors/claims'; import { doFetchRecommendedContent } from 'redux/actions/search'; import { makeSelectRecommendedContentForUri, selectIsSearching } from 'redux/selectors/search'; -import { selectUserVerifiedEmail } from 'redux/selectors/user'; import RecommendedContent from './view'; const select = (state, props) => { @@ -17,7 +16,6 @@ const select = (state, props) => { recommendedContentUris, nextRecommendedUri, isSearching: selectIsSearching(state), - isAuthenticated: selectUserVerifiedEmail(state), }; }; diff --git a/ui/component/recommendedContent/view.jsx b/ui/component/recommendedContent/view.jsx index 2de10bd10..a0cc00226 100644 --- a/ui/component/recommendedContent/view.jsx +++ b/ui/component/recommendedContent/view.jsx @@ -1,9 +1,7 @@ // @flow -import { SHOW_ADS } from 'config'; import React from 'react'; import ClaimList from 'component/claimList'; import ClaimListDiscover from 'component/claimListDiscover'; -import Ads from 'web/component/ads'; import Card from 'component/common/card'; import { useIsMobile, useIsMediumScreen } from 'effects/use-screensize'; import Button from 'component/button'; @@ -19,7 +17,6 @@ type Props = { nextRecommendedUri: string, isSearching: boolean, doFetchRecommendedContent: (string) => void, - isAuthenticated: boolean, claim: ?StreamClaim, claimId: string, }; @@ -31,7 +28,6 @@ export default React.memo(function RecommendedContent(props: Props) { recommendedContentUris, nextRecommendedUri, isSearching, - isAuthenticated, claim, claimId, } = props; @@ -99,7 +95,6 @@ export default React.memo(function RecommendedContent(props: Props) { loading={isSearching} uris={recommendedContentUris} hideMenu={isMobile} - injectedItem={SHOW_ADS && IS_WEB && !isAuthenticated && } empty={__('No related content found')} onClick={handleRecommendationClicked} /> @@ -118,7 +113,6 @@ export default React.memo(function RecommendedContent(props: Props) { channelIds={[signingChannel.claim_id]} loading={isSearching} hideMenu={isMobile} - injectedItem={SHOW_ADS && IS_WEB && !isAuthenticated && } empty={__('No related content found')} /> )} @@ -135,7 +129,6 @@ function areEqual(prevProps: Props, nextProps: Props) { if ( a.uri !== b.uri || a.nextRecommendedUri !== b.nextRecommendedUri || - a.isAuthenticated !== b.isAuthenticated || a.isSearching !== b.isSearching || (a.recommendedContentUris && !b.recommendedContentUris) || (!a.recommendedContentUris && b.recommendedContentUris) || diff --git a/ui/component/syncFatalError/view.jsx b/ui/component/syncFatalError/view.jsx index ad8f83d1f..3656d8a0b 100644 --- a/ui/component/syncFatalError/view.jsx +++ b/ui/component/syncFatalError/view.jsx @@ -4,25 +4,12 @@ import React from 'react'; import Button from 'component/button'; import Yrbl from 'component/yrbl'; import { SITE_HELP_EMAIL } from 'config'; -// @if TARGET='web' -import { STATUS_DEGRADED, STATUS_FAILING, STATUS_DOWN } from 'web/effects/use-degraded-performance'; -// @endif -type Props = { - lbryTvApiStatus: string, -}; +type Props = {}; export default function SyncFatalError(props: Props) { - const { lbryTvApiStatus } = props; - let downTime = false; - // @if TARGET='web' - downTime = - IS_WEB && - (lbryTvApiStatus === STATUS_DEGRADED || lbryTvApiStatus === STATUS_FAILING || lbryTvApiStatus === STATUS_DOWN); - // @endif - return (
({ - theme: selectTheme(state), - claim: makeSelectClaimForUri(props.uri)(state), - isMature: makeSelectClaimIsNsfw(props.uri)(state), -}); - -export default connect(select)(Ads); diff --git a/web/component/ads/view.jsx b/web/component/ads/view.jsx deleted file mode 100644 index e20cfcf84..000000000 --- a/web/component/ads/view.jsx +++ /dev/null @@ -1,123 +0,0 @@ -// @flow -import { DOMAIN, SHOW_ADS } from 'config'; -import * as PAGES from 'constants/pages'; -import React, { useEffect } from 'react'; -import { withRouter } from 'react-router'; -import I18nMessage from 'component/i18nMessage'; -import Button from 'component/button'; -import classnames from 'classnames'; -// $FlowFixMe - -const ADS_URL = '//assets.revcontent.com/master/delivery.js'; -const IS_MOBILE = typeof window.orientation !== 'undefined'; - -type Props = { - location: { pathname: string }, - type: string, - small: boolean, - claim: Claim, - isMature: boolean, -}; - -function Ads(props: Props) { - const { - location: { pathname }, - type = 'sidebar', - small, - } = props; - - useEffect(() => { - if (SHOW_ADS && type === 'video') { - let script; - try { - const d = document; - const s = 'script'; - const n = 'playbuzz-stream'; - let fjs = d.getElementsByTagName(s)[0]; - script = d.createElement(s); - script.className = n; - script.src = 'https://stream.playbuzz.com/player/62d1eb10-e362-4873-99ed-c64a4052b43b'; - // $FlowFixMe - fjs.parentNode.insertBefore(script, fjs); - } catch (e) {} - } - }, [type]); - - useEffect(() => { - if (SHOW_ADS && !IS_MOBILE && type === 'sidebar') { - const script = document.createElement('script'); - script.src = ADS_URL; - script.async = true; - // $FlowFixMe - document.body.appendChild(script); - return () => { - // $FlowFixMe - document.body.removeChild(script); - // if user navigates too rapidly,