Skip to content

Commit 9cbe79d

Browse files
committed
Add Privacy Policy page
1 parent 19219c5 commit 9cbe79d

File tree

8 files changed

+903
-31
lines changed

8 files changed

+903
-31
lines changed
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
import React, { useEffect, useState } from 'react';
2+
import Helmet from 'react-helmet';
3+
import ReactMarkdown from 'react-markdown';
4+
import remarkSlug from 'remark-slug';
5+
import styled from 'styled-components';
6+
import axios from 'axios';
7+
import Nav from '../../../components/Nav';
8+
import { remSize } from '../../../theme';
9+
10+
const PrivacyPolicyContainer = styled.main`
11+
max-width: ${remSize(700)};
12+
margin: 0 auto;
13+
padding: ${remSize(10)};
14+
& p {
15+
margin-bottom: ${remSize(10)};
16+
}
17+
font-size: ${remSize(16)};
18+
& h1 {
19+
font-size: 2em;
20+
}
21+
& h2 {
22+
font-size: 1.5em;
23+
margin-block-start: 0.83em;
24+
margin-block-end: 0.83em;
25+
}
26+
& h3 {
27+
font-size: 1.17em;
28+
margin-block-start: 1em;
29+
margin-block-end: 1em;
30+
font-weight: bold;
31+
}
32+
& ul {
33+
list-style: initial;
34+
padding-inline-start: 40px;
35+
margin-block-start: 1em;
36+
margin-block-end: 1em;
37+
}
38+
`;
39+
40+
function PrivacyPolicy() {
41+
const [privacyPolicy, setPrivacyPolicy] = useState('');
42+
useEffect(() => {
43+
axios.get('privacy-policy.md').then((response) => {
44+
setPrivacyPolicy(response.data);
45+
});
46+
}, []);
47+
return (
48+
<>
49+
<Helmet>
50+
<title>Privacy Policy</title>
51+
</Helmet>
52+
<Nav layout="dashboard" />
53+
<PrivacyPolicyContainer>
54+
<ReactMarkdown remarkPlugins={[remarkSlug]}>
55+
{privacyPolicy}
56+
</ReactMarkdown>
57+
</PrivacyPolicyContainer>
58+
</>
59+
);
60+
}
61+
62+
export default PrivacyPolicy;

client/modules/IDE/pages/TermsOfUse.jsx

Whitespace-only changes.

client/routes.jsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ import CollectionView from './modules/User/pages/CollectionView';
1717
import DashboardView from './modules/User/pages/DashboardView';
1818
import createRedirectWithUsername from './components/createRedirectWithUsername';
1919
import MobileDashboardView from './modules/Mobile/MobileDashboardView';
20+
import PrivacyPolicy from './modules/IDE/pages/PrivacyPolicy';
2021
import { getUser } from './modules/User/actions';
2122
import { stopSketch } from './modules/IDE/actions/ide';
2223
import {
@@ -117,6 +118,7 @@ const routes = (store) => (
117118
{/* Mobile-only Routes */}
118119
<Route path="/preview" component={MobileSketchView} />
119120
<Route path="/preferences" component={MobilePreferences} />
121+
<Route path="privacy-policy" component={PrivacyPolicy} />
120122
</Route>
121123
);
122124

0 commit comments

Comments
 (0)