Don't use EU script on mobile as it breaks the app

This commit is contained in:
infinite-persistence 2022-03-08 12:06:06 +08:00 committed by Thomas Zarebczan
parent 0143b63c74
commit cdcedb8063

View file

@ -64,7 +64,11 @@ function Ads(props: Props) {
// this is populated from app based on location // this is populated from app based on location
const isInEu = localStorage.getItem('gdprRequired') === 'true'; 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 // add script to DOM
useEffect(() => { useEffect(() => {