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 feature listing #452

Merged
merged 6 commits into from Sep 25, 2019
Next

Remove feature listing for ghostery rewards on Cliqz browser

  • Loading branch information
benstrumeyer committed Sep 18, 2019
commit 65df03f76f6886c5500e23742c281cabd6463577
@@ -16,6 +16,7 @@ import PropTypes from 'prop-types';
import SideNavigationView from './SideNavigationView';
import globals from '../../../../src/classes/Globals';

const { IS_CLIQZ } = globals;
/**
* @class Implement the Side Navigation View for the Ghostery Hub
* @extends Component
@@ -46,7 +47,7 @@ class SideNavigationViewContainer extends Component {
const { user, location } = this.props;
const disableRegEx = /^(\/setup(?!\/4$))|(\/tutorial(?!\/6$))/;

const menuItems = [
let menuItems = [
{ href: '/', icon: 'home', text: t('hub_side_navigation_home') },
{ href: '/setup', icon: 'setup', text: t('hub_side_navigation_setup') },
{ href: '/tutorial', icon: 'tutorial', text: t('hub_side_navigation_tutorial') },
@@ -55,6 +56,10 @@ class SideNavigationViewContainer extends Component {
{ href: '/products', icon: 'products', text: t('hub_side_navigation_products') }
];

if (IS_CLIQZ) {
menuItems = menuItems.filter(item => item.href !== '/rewards');
This conversation was marked as resolved by fcjr

This comment has been minimized.

@fcjr

fcjr Sep 18, 2019
Member

@benstrumeyer can we keep the menuItems a constant? You can do this by declaring it something like this:

	const menuItems = [
		{ href: '/', icon: 'home', text: t('hub_side_navigation_home') },
		{ href: '/setup', icon: 'setup', text: t('hub_side_navigation_setup') },
		{ href: '/tutorial', icon: 'tutorial', text: t('hub_side_navigation_tutorial') },
		{ href: '/plus', icon: 'plus', text: t('hub_side_navigation_supporter') },
		...(IS_CLIQZ ? [{ href: '/rewards', icon: 'rewards', text: t('hub_side_navigation_rewards') }] : []),
		...[{ href: '/products', icon: 'products', text: t('hub_side_navigation_products') }]
	];

This comment has been minimized.

@benstrumeyer

benstrumeyer Sep 18, 2019
Author Contributor

Great idea, fixed.

}

const bottomItems = user ? [
{ id: 'email', href: `https://account.${globals.GHOSTERY_DOMAIN}.com/`, text: user.email },
{ id: 'logout', text: t('hub_side_navigation_log_out'), clickHandler: this._handleLogoutClick },
ProTip! Use n and p to navigate between commits in a pull request.