Skip to content
Snippets Groups Projects
Commit 89a748dd authored by Christopher Willis-Ford's avatar Christopher Willis-Ford
Browse files

add hook on telemetry dialog for displaying privacy policy

parent 93406fbe
Branches
Tags
No related merge requests found
......@@ -105,6 +105,7 @@ const GUIComponent = props => {
onRequestCloseTelemetryModal,
onSeeCommunity,
onShare,
onShowPrivacyPolicy,
onTelemetryModalCancel,
onTelemetryModalOptIn,
onTelemetryModalOptOut,
......@@ -162,6 +163,7 @@ const GUIComponent = props => {
onOptIn={onTelemetryModalOptIn}
onOptOut={onTelemetryModalOptOut}
onRequestClose={onRequestCloseTelemetryModal}
onShowPrivacyPolicy={onShowPrivacyPolicy}
/>
) : null}
{loading ? (
......@@ -399,6 +401,7 @@ GUIComponent.propTypes = {
onRequestCloseTelemetryModal: PropTypes.func,
onSeeCommunity: PropTypes.func,
onShare: PropTypes.func,
onShowPrivacyPolicy: PropTypes.func,
onTabSelect: PropTypes.func,
onTelemetryModalCancel: PropTypes.func,
onTelemetryModalOptIn: PropTypes.func,
......
......@@ -101,6 +101,9 @@ class TelemetryModal extends React.PureComponent {
privacyPolicyLink: (<a
className={styles.privacyPolicyLink}
href="https://scratch.mit.edu/privacy_policy/"
onClick={this.props.onShowPrivacyPolicy}
target="_blank"
rel="noopener noreferrer"
>
<FormattedMessage {...messages.privacyPolicyLink} />
</a>)
......@@ -134,7 +137,8 @@ TelemetryModal.propTypes = {
onCancel: PropTypes.func,
onOptIn: PropTypes.func.isRequired,
onOptOut: PropTypes.func.isRequired,
onRequestClose: PropTypes.func
onRequestClose: PropTypes.func,
onShowPrivacyPolicy: PropTypes.func
};
export default injectIntl(TelemetryModal);
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment