Skip to content

Commit 8418673

Browse files
committed
Create RootPage component, update theming for PP and ToS pages
1 parent c8ad522 commit 8418673

File tree

12 files changed

+39
-122
lines changed

12 files changed

+39
-122
lines changed

client/components/RootPage.jsx

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
import styled from 'styled-components';
2+
import { prop } from '../theme';
3+
4+
const RootPage = styled.div`
5+
height: 100%;
6+
overflow: auto;
7+
display: flex;
8+
flex-direction: column;
9+
color: ${prop('primaryTextColor')};
10+
background-color: ${prop('backgroundColor')};
11+
`;
12+
13+
export default RootPage;

client/components/forceProtocol.jsx

Lines changed: 0 additions & 82 deletions
This file was deleted.

client/modules/IDE/pages/PrivacyPolicy.jsx

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import Helmet from 'react-helmet';
33
import axios from 'axios';
44
import Nav from '../../../components/Nav';
55
import PolicyContainer from '../components/PolicyContainer';
6+
import RootPage from '../../../components/RootPage';
67

78
function PrivacyPolicy() {
89
const [privacyPolicy, setPrivacyPolicy] = useState('');
@@ -16,8 +17,10 @@ function PrivacyPolicy() {
1617
<Helmet>
1718
<title>Privacy Policy</title>
1819
</Helmet>
19-
<Nav layout="dashboard" />
20-
<PolicyContainer policy={privacyPolicy} />
20+
<RootPage>
21+
<Nav layout="dashboard" />
22+
<PolicyContainer policy={privacyPolicy} />
23+
</RootPage>
2124
</>
2225
);
2326
}

client/modules/IDE/pages/TermsOfUse.jsx

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import Helmet from 'react-helmet';
33
import axios from 'axios';
44
import Nav from '../../../components/Nav';
55
import PolicyContainer from '../components/PolicyContainer';
6+
import RootPage from '../../../components/RootPage';
67

78
function TermsOfUse() {
89
const [termsOfUse, setTermsOfUse] = useState('');
@@ -16,8 +17,10 @@ function TermsOfUse() {
1617
<Helmet>
1718
<title>Terms of Use</title>
1819
</Helmet>
19-
<Nav layout="dashboard" />
20-
<PolicyContainer policy={termsOfUse} />
20+
<RootPage>
21+
<Nav layout="dashboard" />
22+
<PolicyContainer policy={termsOfUse} />
23+
</RootPage>
2124
</>
2225
);
2326
}

client/modules/User/components/CookieConsent.jsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ const CookieConsentDialog = styled.div`
2727
width: 100%;
2828
height: 100%;
2929
background: ${prop('Modal.background')};
30+
color: ${prop('primaryTextColor')};
3031
border-top: 1px solid ${prop('Separator')};
3132
padding: ${remSize(40)} ${remSize(60)};
3233
`;

client/modules/User/pages/EmailVerificationView.jsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import get from 'lodash/get';
88
import { Helmet } from 'react-helmet';
99
import { verifyEmailConfirmation } from '../actions';
1010
import Nav from '../../../components/Nav';
11+
import RootPage from '../../../components/RootPage';
1112

1213
class EmailVerificationView extends React.Component {
1314
static defaultProps = {
@@ -39,7 +40,7 @@ class EmailVerificationView extends React.Component {
3940
}
4041

4142
return (
42-
<div className="email-verification">
43+
<RootPage>
4344
<Nav layout="dashboard" />
4445
<div className="form-container">
4546
<Helmet>
@@ -52,7 +53,7 @@ class EmailVerificationView extends React.Component {
5253
{status}
5354
</div>
5455
</div>
55-
</div>
56+
</RootPage>
5657
);
5758
}
5859
}

client/modules/User/pages/LoginView.jsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,12 @@ import { useTranslation } from 'react-i18next';
55
import LoginForm from '../components/LoginForm';
66
import SocialAuthButton from '../components/SocialAuthButton';
77
import Nav from '../../../components/Nav';
8+
import RootPage from '../../../components/RootPage';
89

910
function LoginView() {
1011
const { t } = useTranslation();
1112
return (
12-
<div className="login">
13+
<RootPage>
1314
<Nav layout="dashboard" />
1415
<main className="form-container">
1516
<Helmet>
@@ -38,7 +39,7 @@ function LoginView() {
3839
</p>
3940
</div>
4041
</main>
41-
</div>
42+
</RootPage>
4243
);
4344
}
4445

client/modules/User/pages/NewPasswordView.jsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import { useTranslation } from 'react-i18next';
77
import NewPasswordForm from '../components/NewPasswordForm';
88
import { validateResetPasswordToken } from '../actions';
99
import Nav from '../../../components/Nav';
10+
import RootPage from '../../../components/RootPage';
1011

1112
function NewPasswordView(props) {
1213
const { t } = useTranslation();
@@ -27,7 +28,7 @@ function NewPasswordView(props) {
2728
user: true
2829
});
2930
return (
30-
<div className="new-password-container">
31+
<RootPage>
3132
<Nav layout="dashboard" />
3233
<div className={newPasswordClass}>
3334
<Helmet>
@@ -43,7 +44,7 @@ function NewPasswordView(props) {
4344
</p>
4445
</div>
4546
</div>
46-
</div>
47+
</RootPage>
4748
);
4849
}
4950

client/modules/User/pages/ResetPasswordView.jsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import { Helmet } from 'react-helmet';
66
import { useTranslation } from 'react-i18next';
77
import ResetPasswordForm from '../components/ResetPasswordForm';
88
import Nav from '../../../components/Nav';
9+
import RootPage from '../../../components/RootPage';
910

1011
function ResetPasswordView() {
1112
const { t } = useTranslation();
@@ -19,7 +20,7 @@ function ResetPasswordView() {
1920
user: true
2021
});
2122
return (
22-
<div className="reset-password-container">
23+
<RootPage>
2324
<Nav layout="dashboard" />
2425
<div className={resetPasswordClass}>
2526
<Helmet>
@@ -44,7 +45,7 @@ function ResetPasswordView() {
4445
</p>
4546
</div>
4647
</div>
47-
</div>
48+
</RootPage>
4849
);
4950
}
5051

client/modules/User/pages/SignupView.jsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,12 @@ import { useTranslation } from 'react-i18next';
55
import SignupForm from '../components/SignupForm';
66
import SocialAuthButton from '../components/SocialAuthButton';
77
import Nav from '../../../components/Nav';
8+
import RootPage from '../../../components/RootPage';
89

910
function SignupView() {
1011
const { t } = useTranslation();
1112
return (
12-
<div className="signup">
13+
<RootPage>
1314
<Nav layout="dashboard" />
1415
<main className="form-container">
1516
<Helmet>
@@ -38,7 +39,7 @@ function SignupView() {
3839
</p>
3940
</div>
4041
</main>
41-
</div>
42+
</RootPage>
4243
);
4344
}
4445

0 commit comments

Comments
 (0)