From 8303856a0646bf3ea5b5b347ec1a76b495775f54 Mon Sep 17 00:00:00 2001 From: infinite-persistence Date: Thu, 19 May 2022 23:09:24 +0800 Subject: [PATCH] Remove country check Per Tom, this was just a temporary thing due to vidcrunch. --- ui/effects/use-should-show-ads.js | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/ui/effects/use-should-show-ads.js b/ui/effects/use-should-show-ads.js index 4f81c566b..9f0f858cd 100644 --- a/ui/effects/use-should-show-ads.js +++ b/ui/effects/use-should-show-ads.js @@ -2,16 +2,22 @@ import React from 'react'; import { SHOW_ADS } from 'config'; +const NO_COUNTRY_CHECK = true; + const GOOGLE_AD_URL = 'https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js'; let ad_blocker_detected; -export default function useShouldShowAds(hasPremiumPlus: boolean, userCountry: string, doSetAdBlockerFound: (boolean) => void) { +export default function useShouldShowAds( + hasPremiumPlus: boolean, + userCountry: string, + doSetAdBlockerFound: (boolean) => void +) { const [shouldShowAds, setShouldShowAds] = React.useState(resolveAdVisibility()); function resolveAdVisibility() { // 'ad_blocker_detected' will be undefined at startup. Wait until we are // sure it is not blocked (i.e. === false) before showing the component. - return ad_blocker_detected === false && SHOW_ADS && !hasPremiumPlus && userCountry === 'US'; + return ad_blocker_detected === false && SHOW_ADS && !hasPremiumPlus && (NO_COUNTRY_CHECK || userCountry === 'US'); } React.useEffect(() => {