|
|
@ -6,6 +6,8 @@ import { connect } from 'react-redux' |
|
|
|
import { saveSettings } from 'actions/settings' |
|
|
|
import Box from 'components/base/Box' |
|
|
|
import CheckBox from 'components/base/CheckBox' |
|
|
|
import TrackPage from 'analytics/TrackPage' |
|
|
|
import Track from 'analytics/Track' |
|
|
|
import { Title, Description, FixedTopContainer, StepContainerInner } from '../helperComponents' |
|
|
|
import OnboardingFooter from '../OnboardingFooter' |
|
|
|
|
|
|
@ -19,7 +21,7 @@ type State = { |
|
|
|
} |
|
|
|
|
|
|
|
const INITIAL_STATE = { |
|
|
|
analyticsToggle: false, |
|
|
|
analyticsToggle: true, |
|
|
|
sentryLogsToggle: true, |
|
|
|
} |
|
|
|
|
|
|
@ -46,11 +48,17 @@ class Analytics extends PureComponent<StepProps, State> { |
|
|
|
} |
|
|
|
|
|
|
|
render() { |
|
|
|
const { nextStep, t } = this.props |
|
|
|
const { nextStep, t, onboarding } = this.props |
|
|
|
const { analyticsToggle, sentryLogsToggle } = this.state |
|
|
|
|
|
|
|
return ( |
|
|
|
<FixedTopContainer> |
|
|
|
<TrackPage |
|
|
|
category="Onboarding" |
|
|
|
name="Analytics" |
|
|
|
flowType={onboarding.flowType} |
|
|
|
deviceType={onboarding.isLedgerNano ? 'Nano S' : 'Blue'} |
|
|
|
/> |
|
|
|
<StepContainerInner> |
|
|
|
<Title>{t('onboarding:analytics.title')}</Title> |
|
|
|
<Description>{t('onboarding:analytics.desc')}</Description> |
|
|
@ -61,6 +69,14 @@ class Analytics extends PureComponent<StepProps, State> { |
|
|
|
<AnalyticsText>{t('onboarding:analytics.sentryLogs.desc')}</AnalyticsText> |
|
|
|
</Box> |
|
|
|
<Box justifyContent="center"> |
|
|
|
<Track |
|
|
|
onUpdate |
|
|
|
event={ |
|
|
|
sentryLogsToggle |
|
|
|
? 'Sentry Logs Enabled Onboarding' |
|
|
|
: 'Sentry Logs Disabled Onboarding' |
|
|
|
} |
|
|
|
/> |
|
|
|
<CheckBox isChecked={sentryLogsToggle} onChange={this.handleSentryLogsToggle} /> |
|
|
|
</Box> |
|
|
|
</Container> |
|
|
@ -70,6 +86,14 @@ class Analytics extends PureComponent<StepProps, State> { |
|
|
|
<AnalyticsText>{t('onboarding:analytics.shareAnalytics.desc')}</AnalyticsText> |
|
|
|
</Box> |
|
|
|
<Box justifyContent="center"> |
|
|
|
<Track |
|
|
|
onUpdate |
|
|
|
event={ |
|
|
|
analyticsToggle |
|
|
|
? 'Analytics Enabled Onboarding' |
|
|
|
: 'Analytics Disabled Onboarding' |
|
|
|
} |
|
|
|
/> |
|
|
|
<CheckBox isChecked={analyticsToggle} onChange={this.handleAnalyticsToggle} /> |
|
|
|
</Box> |
|
|
|
</Container> |
|
|
|