From a4b795f05e0ab4554f0ecc9802e4773a831f0d93 Mon Sep 17 00:00:00 2001 From: Nejc Zdovc Date: Fri, 11 Jan 2019 19:43:56 +0100 Subject: [PATCH] Merge pull request #1297 from brave/ads-box Fixes rewards disabled for ads --- .../brave_rewards/resources/ui/components/adsBox.tsx | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/components/brave_rewards/resources/ui/components/adsBox.tsx b/components/brave_rewards/resources/ui/components/adsBox.tsx index 90048685a69c..c2d2fecbfbc9 100644 --- a/components/brave_rewards/resources/ui/components/adsBox.tsx +++ b/components/brave_rewards/resources/ui/components/adsBox.tsx @@ -90,21 +90,23 @@ class AdsBox extends React.Component { render () { let adsEnabled = false let adsUIEnabled = false - const { adsData } = this.props.rewardsData + const { adsData, enabledMain } = this.props.rewardsData if (adsData) { adsEnabled = adsData.adsEnabled adsUIEnabled = adsData.adsUIEnabled } + const toggle = !(!enabledMain || !adsUIEnabled) + return (