Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GH-1607: Remove Ghostery rewards toggle, and add language for Cliqz Browser #450

Merged
merged 2 commits into from Sep 17, 2019
Merged
Changes from 1 commit
Commits
File filter
Filter file types
Jump to
Jump to file
Failed to load files.

Always

Just for now

Prev

Move default props to bottom of file. Remove variable name for clarit…

…y. Remove unused scss and props
  • Loading branch information
benstrumeyer committed Sep 17, 2019
commit caba482a263829e67cc571eb7f5fd581ced63971
@@ -100,7 +100,6 @@ class SetupAntiSuiteViewContainer extends Component {

const anti_tracking_enabled = IS_CLIQZ ? false : enable_anti_tracking;
const ad_block_enabled = IS_CLIQZ ? false : enable_ad_block;
const ghostery_rewards_enabled = !IS_CLIQZ;
const features = [
{
id: 'anti-tracking',
@@ -131,7 +130,7 @@ class SetupAntiSuiteViewContainer extends Component {
}
];

if (ghostery_rewards_enabled) {
if (!IS_CLIQZ) {
features.push({
id: 'ghostery-rewards',
name: t('hub_setup_ghosteryrewards_name_rewards'),
@@ -23,15 +23,9 @@ import ClassNames from 'classnames';
const ToggleSwitch = (props) => {
const switchClassNames = ClassNames('ToggleSwitch', {
'ToggleSwitch--active': props.checked,
'ToggleSwitch--locked': props.locked,
'ToggleSwitch--removed': props.removed
'ToggleSwitch--locked': props.locked
});

ToggleSwitch.defaultProps = {
locked: false,
removed: false
};

return (
<div className={switchClassNames} onClick={props.onChange}>
<div className="ToggleSwitch__bar" />
@@ -44,8 +38,11 @@ const ToggleSwitch = (props) => {
ToggleSwitch.propTypes = {
checked: PropTypes.bool.isRequired,
locked: PropTypes.bool,
removed: PropTypes.bool,
onChange: PropTypes.func.isRequired,
};

ToggleSwitch.defaultProps = {
locked: false
};

export default ToggleSwitch;
@@ -52,6 +52,3 @@
.ToggleSwitch.ToggleSwitch--locked {
cursor: not-allowed;
}
.ToggleSwitch.ToggleSwitch--removed {
display: none;
}
@@ -22,7 +22,6 @@ describe('app/shared-components/ToggleSwitch component', () => {
const initialState = {
checked: true,
locked: false,
removed: false,
onChange: () => {},
};

ProTip! Use n and p to navigate between commits in a pull request.