Skip to content

Commit

Permalink
combine trackers blocked and ads blocked on NTP
Browse files Browse the repository at this point in the history
  • Loading branch information
cezaraugusto committed Jul 18, 2019
1 parent 3f69bcc commit 8e72c23
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 10 deletions.
3 changes: 0 additions & 3 deletions components/brave_new_tab_ui/components/default/stats/style.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,6 @@ export const StyledStatsItem = styled<{}, 'li'>('li')`
color: #FB542B;
}
&:nth-child(2) {
color: #B02FFB;
}
&:nth-child(3) {
color: #4C54D2;
}
&:last-child {
Expand Down
7 changes: 1 addition & 6 deletions components/brave_new_tab_ui/containers/newTab/stats.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,7 @@ class Stats extends React.Component<Props, {}> {
}

render () {
const trackedBlockersCount = this.trackedBlockersCount.toLocaleString()
const adblockCount = this.adblockCount.toLocaleString()
const trackedBlockersCount = (this.trackedBlockersCount + this.adblockCount).toLocaleString()
const httpsUpgradedCount = this.httpsUpgradedCount.toLocaleString()
const timeSaved = this.estimatedTimeSaved

Expand All @@ -73,10 +72,6 @@ class Stats extends React.Component<Props, {}> {
description={getLocale('trackersBlocked')}
counter={trackedBlockersCount}
/>
<StatsItem
description={getLocale('adsBlocked')}
counter={adblockCount}
/>
<StatsItem
description={getLocale('httpsUpgraded')}
counter={httpsUpgradedCount}
Expand Down
1 change: 0 additions & 1 deletion components/brave_new_tab_ui/stories/default/stats.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ class Stats extends React.PureComponent<{}, {}> {
return (
<StatsContainer>
<StatsItem counter='42' description={getLocale('trackersBlocked')} />
<StatsItem counter='105' description={getLocale('adsBlocked')} />
<StatsItem counter='0' description={getLocale('httpsUpgrades')} />
<StatsItem counter='5' text={getLocale('minutes')} description={getLocale('estimatedTimeSaved')} />
</StatsContainer>
Expand Down

0 comments on commit 8e72c23

Please sign in to comment.