From 83de8ebcbc7d3bdc65debbd34788a8b1bae0b040 Mon Sep 17 00:00:00 2001 From: Jeff Avallone Date: Fri, 18 Jan 2019 15:40:29 -0500 Subject: [PATCH] Splitting privacy policy into a separate component --- .../PrivacyPolicy/__snapshots__/test.js.snap | 55 +++++++++++++++++++ src/components/PrivacyPolicy/index.js | 54 ++++++++++++++++++ src/components/PrivacyPolicy/test.js | 14 +++++ src/pages/__snapshots__/privacy.test.js.snap | 52 +----------------- src/pages/privacy.js | 47 ++-------------- 5 files changed, 128 insertions(+), 94 deletions(-) create mode 100644 src/components/PrivacyPolicy/__snapshots__/test.js.snap create mode 100644 src/components/PrivacyPolicy/index.js create mode 100644 src/components/PrivacyPolicy/test.js diff --git a/src/components/PrivacyPolicy/__snapshots__/test.js.snap b/src/components/PrivacyPolicy/__snapshots__/test.js.snap new file mode 100644 index 0000000..22b6631 --- /dev/null +++ b/src/components/PrivacyPolicy/__snapshots__/test.js.snap @@ -0,0 +1,55 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`PrivacyPolicy rendering 1`] = ` + + +

+ Regexper and the tools used to create it are all open source. If you are concerned that the JavaScript being delivered is in any way malicious, please inspect the source in the + + GitLab repository + + . +

+

+ There are two data collection tools integrated in the app. These tools are not used to collect personal information: +

+
    +
  • + + Google Analytics + + is used to track browser usage data and application performance. It is configured to anonymize the client IP address. +
  • +
  • + + Sentry.io + + is a tool used to capture and report client-side JavaScript errors. It is configured to not store the client IP address. +
  • +
+

+ Regexper honors the browser + + “Do Not Track” + + setting and will not enable these data collection tools if that setting is enabled. Also, most popular ad blockers will prevent these tools from sending any tracking data. Disabling or blocking these data collection tools will + + not + + impact the performance of this app. The information collected by these tools is used to monitor application performance, determine browser support, and collect error reports. +

+

+ Regexper is not supported by ad revenue or sales of any kind. +

+
+
+`; diff --git a/src/components/PrivacyPolicy/index.js b/src/components/PrivacyPolicy/index.js new file mode 100644 index 0000000..85112e2 --- /dev/null +++ b/src/components/PrivacyPolicy/index.js @@ -0,0 +1,54 @@ +import React from 'react'; +import PropTypes from 'prop-types'; +import { withNamespaces, Trans } from 'react-i18next'; + +import Message from 'components/Message'; + +export const PrivacyPolicy = ({ t }) => ( + + +

+ Regexper and the tools used to create it are all open source. If you are + concerned that the JavaScript being delivered is in any way malicious, + please inspect the source in the GitLab repository. +

+

+ There are two data collection tools integrated in the app. These tools + are not used to collect personal information: +

+
    +
  • + Google Analytics is used to track browser usage data and + application performance. It is configured to anonymize the client IP + address. +
  • +
  • + Sentry.io is a tool used to capture and report client-side + JavaScript errors. It is configured to not store the client IP + address. +
  • +
+

+ Regexper honors the browser “Do Not Track” setting + and will not enable these data collection tools if that setting is + enabled. Also, most popular ad blockers will prevent these tools from + sending any tracking data. Disabling or blocking these data collection + tools will not impact the performance of this app. The + information collected by these tools is used to monitor application + performance, determine browser support, and collect error reports. +

+

+ Regexper is not supported by ad revenue or sales of any kind. +

+
+
+); + +PrivacyPolicy.propTypes = { + t: PropTypes.func.isRequired +}; + +export default withNamespaces()(PrivacyPolicy); diff --git a/src/components/PrivacyPolicy/test.js b/src/components/PrivacyPolicy/test.js new file mode 100644 index 0000000..abd057a --- /dev/null +++ b/src/components/PrivacyPolicy/test.js @@ -0,0 +1,14 @@ +import React from 'react'; +import { shallow } from 'enzyme'; + +import { mockT } from 'i18n'; +import { PrivacyPolicy } from 'components/PrivacyPolicy'; + +describe('PrivacyPolicy', () => { + test('rendering', () => { + const component = shallow( + + ); + expect(component).toMatchSnapshot(); + }); +}); diff --git a/src/pages/__snapshots__/privacy.test.js.snap b/src/pages/__snapshots__/privacy.test.js.snap index 45e8e8d..61cfd89 100644 --- a/src/pages/__snapshots__/privacy.test.js.snap +++ b/src/pages/__snapshots__/privacy.test.js.snap @@ -5,56 +5,6 @@ exports[`Privacy Page rendering 1`] = ` - - -

- Regexper and the tools used to create it are all open source. If you are concerned that the JavaScript being delivered is in any way malicious, please inspect the source in the - - GitLab repository - - . -

-

- There are two data collection tools integrated in the app. These tools are not used to collect personal information: -

-
    -
  • - - Google Analytics - - is used to track browser usage data and application performance. It is configured to anonymize the client IP address. -
  • -
  • - - Sentry.io - - is a tool used to capture and report client-side JavaScript errors. It is configured to not store the client IP address. -
  • -
-

- Regexper honors the browser - - “Do Not Track” - - setting and will not enable these data collection tools if that setting is enabled. Also, most popular ad blockers will prevent these tools from sending any tracking data. Disabling or blocking these data collection tools will - - not - - impact the performance of this app. The information collected by these tools is used to monitor application performance, determine browser support, and collect error reports. -

-

- Regexper is not supported by ad revenue or sales of any kind. -

-
-
+ `; diff --git a/src/pages/privacy.js b/src/pages/privacy.js index 70104be..dbc17aa 100644 --- a/src/pages/privacy.js +++ b/src/pages/privacy.js @@ -1,53 +1,14 @@ import React from 'react'; import PropTypes from 'prop-types'; -import { withNamespaces, Trans } from 'react-i18next'; +import { withNamespaces } from 'react-i18next'; import Metadata from 'components/Metadata'; -import Message from 'components/Message'; +import PrivacyPolicy from 'components/PrivacyPolicy'; export const PrivacyPage = ({ t }) => <> - - -

- Regexper and the tools used to create it are all open source. If you are - concerned that the JavaScript being delivered is in any way malicious, - please inspect the source in the GitLab repository. -

-

- There are two data collection tools integrated in the app. These tools - are not used to collect personal information: -

-
    -
  • - Google Analytics is used to track browser usage data and - application performance. It is configured to anonymize the client IP - address. -
  • -
  • - Sentry.io is a tool used to capture and report client-side - JavaScript errors. It is configured to not store the client IP - address. -
  • -
-

- Regexper honors the browser “Do Not Track” setting - and will not enable these data collection tools if that setting is - enabled. Also, most popular ad blockers will prevent these tools from - sending any tracking data. Disabling or blocking these data collection - tools will not impact the performance of this app. The - information collected by these tools is used to monitor application - performance, determine browser support, and collect error reports. -

-

- Regexper is not supported by ad revenue or sales of any kind. -

-
-
- ; + +; PrivacyPage.propTypes = { t: PropTypes.func.isRequired