diff --git a/app/panel/components/BuildingBlocks/CliqzFeature.jsx b/app/panel/components/BuildingBlocks/CliqzFeature.jsx index 9c97b1aa3..6ded5c7d0 100644 --- a/app/panel/components/BuildingBlocks/CliqzFeature.jsx +++ b/app/panel/components/BuildingBlocks/CliqzFeature.jsx @@ -50,28 +50,9 @@ class CliqzFeature extends React.Component { }); } - _getCount(active, data, type) { - if (!active) { - return '-'; - } - - if (type === 'anti_track') { - return data && data.totalUnsafeCount || 0; - } else if (type === 'ad_block') { - return data && data.totalCount || 0; - } else if (type === 'smart_block') { - return this._count(data, data.blocked) + this._count(data, data.unblocked); - } - - return 0; + _getStatus(active) { + return active ? t('drawer_on') : t('drawer_off'); } - _count(object, property) { - return object && this._length(property) || 0; - } - _length(object) { - return Object.keys(object).length; - } - _getTooltipBodyText(active, isTooltipBody, type) { if (!isTooltipBody) return false; @@ -99,7 +80,6 @@ class CliqzFeature extends React.Component { const { active, cliqzInactive, - data, isSmaller, isCondensed, isTooltipBody, @@ -125,7 +105,7 @@ class CliqzFeature extends React.Component { return (
-
{this._getCount(active, data, type)}
+
{this._getStatus(active)}
%3Ccircle%20cx%3D%227%22%20cy%3D%227%22%20r%3D%226%22%20stroke-width%3D%222%22%20stroke%3D%22#{url-friendly-colour($stroke-color)}%22%20fill%3D%22none%22/%3E%3C/svg%3E');