diff --git a/src/components/Onboarding/steps/Analytics.js b/src/components/Onboarding/steps/Analytics.js index 2719d2cc..7a771da6 100644 --- a/src/components/Onboarding/steps/Analytics.js +++ b/src/components/Onboarding/steps/Analytics.js @@ -2,7 +2,8 @@ import React, { PureComponent } from 'react' import styled from 'styled-components' - +import { connect } from 'react-redux' +import { saveSettings } from 'actions/settings' import Box from 'components/base/Box' import CheckBox from 'components/base/CheckBox' import { Title, Description } from '../helperComponents' @@ -10,6 +11,8 @@ import OnboardingFooter from '../OnboardingFooter' import type { StepProps } from '..' +const mapDispatchToProps = { saveSettings } + type State = { analyticsToggle: boolean, termsConditionsToggle: boolean, @@ -17,9 +20,9 @@ type State = { } const INITIAL_STATE = { - analyticsToggle: false, + analyticsToggle: true, termsConditionsToggle: false, - sentryLogsToggle: false, + sentryLogsToggle: true, } class Analytics extends PureComponent { @@ -100,7 +103,10 @@ class Analytics extends PureComponent { } } -export default Analytics +export default connect( + null, + mapDispatchToProps, +)(Analytics) export const AnalyticsText = styled(Box).attrs({ ff: 'Open Sans|Regular', diff --git a/src/components/SettingsPage/sections/Profile.js b/src/components/SettingsPage/sections/Profile.js index 7349dcf8..d3557f09 100644 --- a/src/components/SettingsPage/sections/Profile.js +++ b/src/components/SettingsPage/sections/Profile.js @@ -160,7 +160,10 @@ class TabProfile extends PureComponent { title={t('app:settings.profile.developerMode')} desc={t('app:settings.profile.developerModeDesc')} > - + saveSettings({ developerMode })} + /> ({ ...state, ...settings, - developerMode: settings.developerMode || !!process.env.__DEV__, }), FETCH_SETTINGS: ( state: SettingsState, @@ -127,7 +126,6 @@ const handlers: Object = { ) => ({ ...state, ...settings, - developerMode: settings.developerMode || !!process.env.__DEV__, loaded: true, }), }