From cdcedb80631f5bbb740f71bff380b8d74724b641 Mon Sep 17 00:00:00 2001 From: infinite-persistence Date: Tue, 8 Mar 2022 12:06:06 +0800 Subject: [PATCH] Don't use EU script on mobile as it breaks the app --- web/component/ads/view.jsx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/web/component/ads/view.jsx b/web/component/ads/view.jsx index 8ef94a28d..4ff1b2d6a 100644 --- a/web/component/ads/view.jsx +++ b/web/component/ads/view.jsx @@ -64,7 +64,11 @@ function Ads(props: Props) { // this is populated from app based on location const isInEu = localStorage.getItem('gdprRequired') === 'true'; - const adConfig = isInEu ? AD_CONFIGS.EU : mobileAds ? AD_CONFIGS.MOBILE : AD_CONFIGS.DEFAULT; + + // const adConfig = isInEu ? AD_CONFIGS.EU : mobileAds ? AD_CONFIGS.MOBILE : AD_CONFIGS.DEFAULT; + // -- The logic above is what we are asked to do, but the EU script breaks our + // -- app's CSS when ran on mobile. + const adConfig = mobileAds ? AD_CONFIGS.MOBILE : isInEu ? AD_CONFIGS.EU : AD_CONFIGS.DEFAULT; // add script to DOM useEffect(() => {