Skip to content

Commit

Permalink
Add terms to signin page on cash
Browse files Browse the repository at this point in the history
  • Loading branch information
puneetlath committed Mar 22, 2021
1 parent 9a06b68 commit 6d18814
Show file tree
Hide file tree
Showing 9 changed files with 93 additions and 39 deletions.
3 changes: 3 additions & 0 deletions src/CONST.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ const CONST = {
PDF_VIEWER_URL: '/pdf/web/viewer.html',
EXPENSIFY_ICON_URL: `${CLOUDFRONT_URL}/images/favicon-2019.png`,
UPWORK_URL: 'https://www.upwork.com/ab/jobs/search/?q=Expensify%20React%20Native&user_location_match=2',
TERMS_URL: 'https://use.expensify.com/terms',
PRIVACY_URL: 'https://use.expensify.com/privacy',
LICENSES_URL: 'https://use.expensify.com/licenses',
OPTION_TYPE: {
REPORT: 'report',
PERSONAL_DETAIL: 'personalDetail',
Expand Down
39 changes: 0 additions & 39 deletions src/pages/NotFound.js

This file was deleted.

3 changes: 3 additions & 0 deletions src/pages/signin/SignInPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import SignInPageLayout from './SignInPageLayout';
import LoginForm from './LoginForm';
import PasswordForm from './PasswordForm';
import ResendValidationForm from './ResendValidationForm';
import TermsAndLicenses from './TermsAndLicenses';

const propTypes = {
/* Onyx Props */
Expand Down Expand Up @@ -92,6 +93,8 @@ class SignInPage extends Component {
)}
</View>
)}

<TermsAndLicenses />
</SignInPageLayout>
</SafeAreaView>
</>
Expand Down
32 changes: 32 additions & 0 deletions src/pages/signin/TermsAndLicenses/TermsOnly.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
import React from 'react';
import {Text, View} from 'react-native';
import styles from '../../../styles/styles';
import CONST from '../../../CONST';
import openURLInNewTab from '../../../libs/openURLInNewTab';

const TermsOnly = () => (
<View style={[styles.mt6]}>
<Text style={[styles.loginTermsText]}>
By logging in, you agree to the
{' '}
<Text
style={[styles.loginTermsText, styles.link]}
onPress={() => openURLInNewTab(CONST.TERMS_URL)}
>
terms of service
</Text>
{' '}
and
{' '}
<Text
style={[styles.loginTermsText, styles.link]}
onPress={() => openURLInNewTab(CONST.PRIVACY_URL)}
>
privacy policy
</Text>
.
</Text>
</View>
);

export default TermsOnly;
40 changes: 40 additions & 0 deletions src/pages/signin/TermsAndLicenses/TermsWithLicenses.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
import React from 'react';
import {Text, View} from 'react-native';
import styles from '../../../styles/styles';
import CONST from '../../../CONST';
import openURLInNewTab from '../../../libs/openURLInNewTab';

const TermsWithLicenses = () => (
<View style={[styles.mt6]}>
<Text style={[styles.loginTermsText]}>
By logging in, you agree to the
{' '}
<Text
style={[styles.loginTermsText, styles.link]}
onPress={() => openURLInNewTab(CONST.TERMS_URL)}
>
terms of service
</Text>
{' '}
and
{' '}
<Text
style={[styles.loginTermsText, styles.link]}
onPress={() => openURLInNewTab(CONST.PRIVACY_URL)}
>
privacy policy
</Text>
. Money transmission is provided by Expensify Payments LLC (NMLS ID:2017010) pursuant to its
{' '}
<Text
style={[styles.loginTermsText, styles.link]}
onPress={() => openURLInNewTab(CONST.LICENSES_URL)}
>
licenses
</Text>
.
</Text>
</View>
);

export default TermsWithLicenses;
3 changes: 3 additions & 0 deletions src/pages/signin/TermsAndLicenses/index.desktop.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import TermsOnly from './TermsOnly';

export default TermsOnly;
3 changes: 3 additions & 0 deletions src/pages/signin/TermsAndLicenses/index.native.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import TermsOnly from './TermsOnly';

export default TermsOnly;
3 changes: 3 additions & 0 deletions src/pages/signin/TermsAndLicenses/index.website.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import TermsWithLicenses from './TermsWithLicenses';

export default TermsWithLicenses;
6 changes: 6 additions & 0 deletions src/styles/styles.js
Original file line number Diff line number Diff line change
Expand Up @@ -386,6 +386,12 @@ const styles = {
width: '100%',
},

loginTermsText: {
color: themeColors.textSupporting,
fontSize: variables.fontSizeSmall,
lineHeight: 20,
},

// Sidebar Styles
sidebar: {
backgroundColor: themeColors.sidebar,
Expand Down

0 comments on commit 6d18814

Please sign in to comment.