From d3da565ce9846d0ddb4b8c59b9ce6084a0360e46 Mon Sep 17 00:00:00 2001 From: bartektomczyk Date: Wed, 3 Jan 2024 08:42:32 +0100 Subject: [PATCH 1/2] fix: fixed color style in icon, changed way of redirecting to the olddot --- assets/images/new-expensify.svg | 2 +- src/CONST.ts | 1 - src/pages/settings/InitialSettingsPage.js | 6 ++++-- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/assets/images/new-expensify.svg b/assets/images/new-expensify.svg index 38276ecd9385..89102ecbc5e4 100644 --- a/assets/images/new-expensify.svg +++ b/assets/images/new-expensify.svg @@ -1 +1 @@ - \ No newline at end of file + diff --git a/src/CONST.ts b/src/CONST.ts index 8b5c0f5a88ca..5d3969fffd9c 100755 --- a/src/CONST.ts +++ b/src/CONST.ts @@ -479,7 +479,6 @@ const CONST = { ONFIDO_TERMS_OF_SERVICE_URL: 'https://onfido.com/terms-of-service/', // Use Environment.getEnvironmentURL to get the complete URL with port number DEV_NEW_EXPENSIFY_URL: 'https://dev.new.expensify.com:', - EXPENSIFY_INBOX_URL: 'https://www.expensify.com/inbox', SIGN_IN_FORM_WIDTH: 300, diff --git a/src/pages/settings/InitialSettingsPage.js b/src/pages/settings/InitialSettingsPage.js index d2b91ed6b76b..5c498128c308 100755 --- a/src/pages/settings/InitialSettingsPage.js +++ b/src/pages/settings/InitialSettingsPage.js @@ -128,6 +128,8 @@ const defaultProps = { ...withCurrentUserPersonalDetailsDefaultProps, }; +const INBOX_URL = 'inbox'; + function InitialSettingsPage(props) { const theme = useTheme(); const styles = useThemeStyles(); @@ -267,11 +269,11 @@ function InitialSettingsPage(props) { translationKey: 'initialSettingsPage.goToExpensifyClassic', icon: Expensicons.NewExpensify, action: () => { - Link.openExternalLink(CONST.EXPENSIFY_INBOX_URL); + Link.openOldDotLink(INBOX_URL); }, shouldShowRightIcon: true, iconRight: Expensicons.NewWindow, - link: CONST.EXPENSIFY_INBOX_URL, + link: Link.buildOldDotURL(INBOX_URL), }, { translationKey: 'initialSettingsPage.signOut', From cc026429b0c739cef3142a43620991f712a97ba0 Mon Sep 17 00:00:00 2001 From: bartektomczyk Date: Thu, 11 Jan 2024 20:21:24 +0100 Subject: [PATCH 2/2] refactor: move inbox url to the const --- src/CONST.ts | 3 +++ src/pages/settings/InitialSettingsPage.js | 6 ++---- src/pages/settings/Wallet/ExpensifyCardPage.js | 2 +- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/CONST.ts b/src/CONST.ts index 5d3969fffd9c..e7c8291f4308 100755 --- a/src/CONST.ts +++ b/src/CONST.ts @@ -479,6 +479,9 @@ const CONST = { ONFIDO_TERMS_OF_SERVICE_URL: 'https://onfido.com/terms-of-service/', // Use Environment.getEnvironmentURL to get the complete URL with port number DEV_NEW_EXPENSIFY_URL: 'https://dev.new.expensify.com:', + OLDDOT_URLS: { + INBOX: 'inbox', + }, SIGN_IN_FORM_WIDTH: 300, diff --git a/src/pages/settings/InitialSettingsPage.js b/src/pages/settings/InitialSettingsPage.js index 5c498128c308..6e310b9a62bd 100755 --- a/src/pages/settings/InitialSettingsPage.js +++ b/src/pages/settings/InitialSettingsPage.js @@ -128,8 +128,6 @@ const defaultProps = { ...withCurrentUserPersonalDetailsDefaultProps, }; -const INBOX_URL = 'inbox'; - function InitialSettingsPage(props) { const theme = useTheme(); const styles = useThemeStyles(); @@ -269,11 +267,11 @@ function InitialSettingsPage(props) { translationKey: 'initialSettingsPage.goToExpensifyClassic', icon: Expensicons.NewExpensify, action: () => { - Link.openOldDotLink(INBOX_URL); + Link.openOldDotLink(CONST.OLDDOT_URLS.INBOX); }, shouldShowRightIcon: true, iconRight: Expensicons.NewWindow, - link: Link.buildOldDotURL(INBOX_URL), + link: Link.buildOldDotURL(CONST.OLDDOT_URLS.INBOX), }, { translationKey: 'initialSettingsPage.signOut', diff --git a/src/pages/settings/Wallet/ExpensifyCardPage.js b/src/pages/settings/Wallet/ExpensifyCardPage.js index 3c44f806fdb8..856c0613cec7 100644 --- a/src/pages/settings/Wallet/ExpensifyCardPage.js +++ b/src/pages/settings/Wallet/ExpensifyCardPage.js @@ -208,7 +208,7 @@ function ExpensifyCardPage({ medium style={[styles.mh5, styles.mb5]} text={translate('cardPage.reviewTransaction')} - onPress={() => Link.openOldDotLink('inbox')} + onPress={() => Link.openOldDotLink(CONST.OLDDOT_URLS.INBOX)} /> ) : null}