Splitting privacy policy into a separate component
This commit is contained in:
parent
f776d19404
commit
83de8ebcbc
55
src/components/PrivacyPolicy/__snapshots__/test.js.snap
Normal file
55
src/components/PrivacyPolicy/__snapshots__/test.js.snap
Normal file
@ -0,0 +1,55 @@
|
||||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
|
||||
exports[`PrivacyPolicy rendering 1`] = `
|
||||
<Message
|
||||
heading="TRANSLATE(Privacy Policy)"
|
||||
type="info"
|
||||
>
|
||||
<WithMergedOptions(TransComponent)
|
||||
i18nKey="Privacy policy copy"
|
||||
>
|
||||
<p>
|
||||
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
|
||||
<a
|
||||
href="https://gitlab.com/javallone/regexper-static"
|
||||
rel="external noopener noreferrer"
|
||||
target="_blank"
|
||||
>
|
||||
GitLab repository
|
||||
</a>
|
||||
.
|
||||
</p>
|
||||
<p>
|
||||
There are two data collection tools integrated in the app. These tools are not used to collect personal information:
|
||||
</p>
|
||||
<ul>
|
||||
<li>
|
||||
<b>
|
||||
Google Analytics
|
||||
</b>
|
||||
is used to track browser usage data and application performance. It is configured to anonymize the client IP address.
|
||||
</li>
|
||||
<li>
|
||||
<b>
|
||||
Sentry.io
|
||||
</b>
|
||||
is a tool used to capture and report client-side JavaScript errors. It is configured to not store the client IP address.
|
||||
</li>
|
||||
</ul>
|
||||
<p>
|
||||
Regexper honors the browser
|
||||
<b>
|
||||
“Do Not Track”
|
||||
</b>
|
||||
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
|
||||
<b>
|
||||
not
|
||||
</b>
|
||||
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.
|
||||
</p>
|
||||
<p>
|
||||
Regexper is not supported by ad revenue or sales of any kind.
|
||||
</p>
|
||||
</WithMergedOptions(TransComponent)>
|
||||
</Message>
|
||||
`;
|
54
src/components/PrivacyPolicy/index.js
Normal file
54
src/components/PrivacyPolicy/index.js
Normal file
@ -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 }) => (
|
||||
<Message type="info" heading={ t('Privacy Policy') }>
|
||||
<Trans i18nKey="Privacy policy copy">
|
||||
<p>
|
||||
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 <a
|
||||
href="https://gitlab.com/javallone/regexper-static"
|
||||
rel="external noopener noreferrer"
|
||||
target="_blank">GitLab repository</a>.
|
||||
</p>
|
||||
<p>
|
||||
There are two data collection tools integrated in the app. These tools
|
||||
are not used to collect personal information:
|
||||
</p>
|
||||
<ul>
|
||||
<li>
|
||||
<b>Google Analytics</b> is used to track browser usage data and
|
||||
application performance. It is configured to anonymize the client IP
|
||||
address.
|
||||
</li>
|
||||
<li>
|
||||
<b>Sentry.io</b> is a tool used to capture and report client-side
|
||||
JavaScript errors. It is configured to not store the client IP
|
||||
address.
|
||||
</li>
|
||||
</ul>
|
||||
<p>
|
||||
Regexper honors the browser <b>“Do Not Track”</b> 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 <b>not</b> 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.
|
||||
</p>
|
||||
<p>
|
||||
Regexper is not supported by ad revenue or sales of any kind.
|
||||
</p>
|
||||
</Trans>
|
||||
</Message>
|
||||
);
|
||||
|
||||
PrivacyPolicy.propTypes = {
|
||||
t: PropTypes.func.isRequired
|
||||
};
|
||||
|
||||
export default withNamespaces()(PrivacyPolicy);
|
14
src/components/PrivacyPolicy/test.js
Normal file
14
src/components/PrivacyPolicy/test.js
Normal file
@ -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(
|
||||
<PrivacyPolicy t={ mockT } />
|
||||
);
|
||||
expect(component).toMatchSnapshot();
|
||||
});
|
||||
});
|
@ -5,56 +5,6 @@ exports[`Privacy Page rendering 1`] = `
|
||||
<LoadNamespace(Metadata)
|
||||
title="TRANSLATE(Privacy Policy)"
|
||||
/>
|
||||
<Message
|
||||
heading="TRANSLATE(Privacy Policy)"
|
||||
type="info"
|
||||
>
|
||||
<WithMergedOptions(TransComponent)
|
||||
i18nKey="Privacy policy copy"
|
||||
>
|
||||
<p>
|
||||
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
|
||||
<a
|
||||
href="https://gitlab.com/javallone/regexper-static"
|
||||
rel="external noopener noreferrer"
|
||||
target="_blank"
|
||||
>
|
||||
GitLab repository
|
||||
</a>
|
||||
.
|
||||
</p>
|
||||
<p>
|
||||
There are two data collection tools integrated in the app. These tools are not used to collect personal information:
|
||||
</p>
|
||||
<ul>
|
||||
<li>
|
||||
<b>
|
||||
Google Analytics
|
||||
</b>
|
||||
is used to track browser usage data and application performance. It is configured to anonymize the client IP address.
|
||||
</li>
|
||||
<li>
|
||||
<b>
|
||||
Sentry.io
|
||||
</b>
|
||||
is a tool used to capture and report client-side JavaScript errors. It is configured to not store the client IP address.
|
||||
</li>
|
||||
</ul>
|
||||
<p>
|
||||
Regexper honors the browser
|
||||
<b>
|
||||
“Do Not Track”
|
||||
</b>
|
||||
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
|
||||
<b>
|
||||
not
|
||||
</b>
|
||||
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.
|
||||
</p>
|
||||
<p>
|
||||
Regexper is not supported by ad revenue or sales of any kind.
|
||||
</p>
|
||||
</WithMergedOptions(TransComponent)>
|
||||
</Message>
|
||||
<LoadNamespace(PrivacyPolicy) />
|
||||
</Fragment>
|
||||
`;
|
||||
|
@ -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 }) => <>
|
||||
<Metadata title={ t('Privacy Policy') } />
|
||||
<Message type="info" heading={ t('Privacy Policy') }>
|
||||
<Trans i18nKey="Privacy policy copy">
|
||||
<p>
|
||||
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 <a
|
||||
href="https://gitlab.com/javallone/regexper-static"
|
||||
rel="external noopener noreferrer"
|
||||
target="_blank">GitLab repository</a>.
|
||||
</p>
|
||||
<p>
|
||||
There are two data collection tools integrated in the app. These tools
|
||||
are not used to collect personal information:
|
||||
</p>
|
||||
<ul>
|
||||
<li>
|
||||
<b>Google Analytics</b> is used to track browser usage data and
|
||||
application performance. It is configured to anonymize the client IP
|
||||
address.
|
||||
</li>
|
||||
<li>
|
||||
<b>Sentry.io</b> is a tool used to capture and report client-side
|
||||
JavaScript errors. It is configured to not store the client IP
|
||||
address.
|
||||
</li>
|
||||
</ul>
|
||||
<p>
|
||||
Regexper honors the browser <b>“Do Not Track”</b> 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 <b>not</b> 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.
|
||||
</p>
|
||||
<p>
|
||||
Regexper is not supported by ad revenue or sales of any kind.
|
||||
</p>
|
||||
</Trans>
|
||||
</Message>
|
||||
</>;
|
||||
<PrivacyPolicy />
|
||||
</>;
|
||||
|
||||
PrivacyPage.propTypes = {
|
||||
t: PropTypes.func.isRequired
|
||||
|
Loading…
Reference in New Issue
Block a user