diff --git a/_locales/en/messages.json b/_locales/en/messages.json index d77171d7e..3e267c58b 100644 --- a/_locales/en/messages.json +++ b/_locales/en/messages.json @@ -1848,12 +1848,6 @@ "ghostery_browser_hub_onboarding_already_have_account": { "message": "I already have an account." }, - "ghostery_browser_hub_onboarding_send_me": { - "message": "Send me" - }, - "ghostery_browser_hub_onboarding_updates_and_promotions": { - "message": "updates & promotions." - }, "ghostery_browser_hub_onboarding_skip": { "message": "Skip" }, diff --git a/app/Account/AccountActions.js b/app/Account/AccountActions.js index c51317dec..9211d5c8b 100644 --- a/app/Account/AccountActions.js +++ b/app/Account/AccountActions.js @@ -28,7 +28,7 @@ import { GET_USER_SETTINGS_FAIL, GET_USER_SUBSCRIPTION_DATA_FAIL, GET_USER_SUBSCRIPTION_DATA_SUCCESS, - ACCOUNT_DATA_EMAIL_PREFERENCES_CHECKBOX_CHANGE + SUBSCRIBE_TO_EMAIL_LIST } from './AccountConstants'; import { SET_TOAST } from '../hub/Views/AppView/AppViewConstants'; import { CLEAR_THEME } from '../panel/constants/constants'; @@ -203,9 +203,9 @@ export const resetPassword = email => dispatch => ( }) ); -export const handleEmailPreferencesCheckboxChange = (name, checked) => dispatch => ( +export const subscribeToEmailList = name => dispatch => ( dispatch({ - type: ACCOUNT_DATA_EMAIL_PREFERENCES_CHECKBOX_CHANGE, - payload: { name, checked }, + type: SUBSCRIBE_TO_EMAIL_LIST, + payload: { name }, }) ); diff --git a/app/Account/AccountConstants.js b/app/Account/AccountConstants.js index 0f95a09c4..e3a4f2bae 100644 --- a/app/Account/AccountConstants.js +++ b/app/Account/AccountConstants.js @@ -38,4 +38,4 @@ export const GET_USER_SUBSCRIPTION_DATA_FAIL = 'GET_USER_SUBSCRIPTION_DATA_FAIL' export const GET_USER_SUBSCRIPTION_DATA_SUCCESS = 'GET_USER_SUBSCRIPTION_DATA_SUCCESS'; // Opt into/out of updates and promotions sendgrid emails -export const ACCOUNT_DATA_EMAIL_PREFERENCES_CHECKBOX_CHANGE = 'ACCOUNT_DATA_EMAIL_PREFERENCES_CHECKBOX_CHANGE'; +export const SUBSCRIBE_TO_EMAIL_LIST = 'SUBSCRIBE_TO_EMAIL_LIST'; diff --git a/app/Account/AccountReducer.js b/app/Account/AccountReducer.js index 0a91127a1..e8b63cc0b 100644 --- a/app/Account/AccountReducer.js +++ b/app/Account/AccountReducer.js @@ -21,7 +21,7 @@ import { GET_USER_SUBSCRIPTION_DATA_SUCCESS, RESET_PASSWORD_SUCCESS, RESET_PASSWORD_FAIL, - ACCOUNT_DATA_EMAIL_PREFERENCES_CHECKBOX_CHANGE + SUBSCRIBE_TO_EMAIL_LIST } from './AccountConstants'; import { UPDATE_PANEL_DATA } from '../panel/constants/constants'; @@ -119,11 +119,11 @@ export default (state = initialState, action) => { resetPasswordError: true }; } - case ACCOUNT_DATA_EMAIL_PREFERENCES_CHECKBOX_CHANGE: { - const { name, checked } = action.payload; + case SUBSCRIBE_TO_EMAIL_LIST: { + const { name } = action.payload; let emailPreferences; if (name === 'global') { - emailPreferences = { ...state.user.emailPreferences, ...{ global: checked } }; + emailPreferences = { ...state.user.emailPreferences, ...{ global: true } }; } const user = { ...state.user, ...{ emailPreferences } }; return { ...state, ...{ user } }; diff --git a/app/ghostery-browser-hub/Views/OnboardingViews/Step1_CreateAccountForm/Step1_CreateAccountForm.jsx b/app/ghostery-browser-hub/Views/OnboardingViews/Step1_CreateAccountForm/Step1_CreateAccountForm.jsx index 33c96999c..838b3f431 100644 --- a/app/ghostery-browser-hub/Views/OnboardingViews/Step1_CreateAccountForm/Step1_CreateAccountForm.jsx +++ b/app/ghostery-browser-hub/Views/OnboardingViews/Step1_CreateAccountForm/Step1_CreateAccountForm.jsx @@ -16,8 +16,6 @@ import PropTypes from 'prop-types'; import ClassNames from 'classnames'; import ToggleCheckbox from '../../../../shared-components/ToggleCheckbox'; -const promoString = `${t('ghostery_browser_hub_onboarding_send_me')} Ghostery ${t('ghostery_browser_hub_onboarding_updates_and_promotions')}`; - /** * A Functional React component for rendering the Browser Create Account View * @return {JSX} JSX for rendering the Browser Create Account View of the Hub app @@ -39,9 +37,7 @@ const Step1_CreateAccountForm = (props) => { legalConsentChecked, legalConsentNotCheckedError, handleLegalConsentCheckboxChange, - isUpdatesChecked, handleInputChange, - handleUpdatesCheckboxChange, handleSubmit, } = props; @@ -192,23 +188,6 @@ const Step1_CreateAccountForm = (props) => { )} -