From 90a4e1b3d400d0a1095d78ac3506feb664d8ad78 Mon Sep 17 00:00:00 2001 From: cowboycito Date: Fri, 16 Dec 2022 23:09:18 -0300 Subject: [PATCH] Fixed PR comments --- desktop/main.js | 4 +-- .../DeeplinkWrapper.website.js | 12 ++++----- .../DeeplinkWrapper/deeplinkRoutes.js | 26 +++++++++---------- src/languages/es.js | 8 +++--- src/styles/fontFamily/index.js | 6 +---- src/styles/styles.js | 2 +- 6 files changed, 26 insertions(+), 32 deletions(-) diff --git a/desktop/main.js b/desktop/main.js index 2fe3bf88adc8..fc8e17924ec8 100644 --- a/desktop/main.js +++ b/desktop/main.js @@ -202,8 +202,8 @@ const mainWindow = (() => { app.on('will-finish-launching', () => { app.on('open-url', (event, url) => { event.preventDefault(); - const urlObj = new URL(url); - deeplinkUrl = `${APP_DOMAIN}${urlObj.pathname}`; + const urlObject = new URL(url); + deeplinkUrl = `${APP_DOMAIN}${urlObject.pathname}`; if (browserWindow) { browserWindow.loadURL(deeplinkUrl); diff --git a/src/components/DeeplinkWrapper/DeeplinkWrapper.website.js b/src/components/DeeplinkWrapper/DeeplinkWrapper.website.js index aac1bae7c858..d073f744851a 100644 --- a/src/components/DeeplinkWrapper/DeeplinkWrapper.website.js +++ b/src/components/DeeplinkWrapper/DeeplinkWrapper.website.js @@ -70,8 +70,8 @@ class DeeplinkWrapper extends PureComponent { openRouteInDesktopApp() { const pathname = window.location.pathname; - const expenfifyUrl = new URL(CONFIG.EXPENSIFY.NEW_EXPENSIFY_URL); - const expenfifyDeeplinkUrl = `${CONST.DEEPLINK_BASE_URL}${expenfifyUrl.host}${pathname}`; + const expensifyUrl = new URL(CONFIG.EXPENSIFY.NEW_EXPENSIFY_URL); + const expensifyDeeplinkUrl = `${CONST.DEEPLINK_BASE_URL}${expensifyUrl.host}${pathname}`; // This check is necessary for Safari, otherwise, if the user // does NOT have the Expensify desktop app installed, it's gonna @@ -80,7 +80,7 @@ class DeeplinkWrapper extends PureComponent { const iframe = document.createElement('iframe'); iframe.style.display = 'none'; document.body.appendChild(iframe); - iframe.contentWindow.location.href = expenfifyDeeplinkUrl; + iframe.contentWindow.location.href = expensifyDeeplinkUrl; setTimeout(() => { if (!iframe.parentNode) { @@ -90,7 +90,7 @@ class DeeplinkWrapper extends PureComponent { iframe.parentNode.removeChild(iframe); }, 100); } else { - window.location.href = expenfifyDeeplinkUrl; + window.location.href = expensifyDeeplinkUrl; } } @@ -114,7 +114,7 @@ class DeeplinkWrapper extends PureComponent { ) { return ( - + - + {this.props.translate('deeplinkWrapper.launching')} diff --git a/src/components/DeeplinkWrapper/deeplinkRoutes.js b/src/components/DeeplinkWrapper/deeplinkRoutes.js index c59a15c4c4d7..d5ee69de1291 100644 --- a/src/components/DeeplinkWrapper/deeplinkRoutes.js +++ b/src/components/DeeplinkWrapper/deeplinkRoutes.js @@ -1,46 +1,44 @@ +import ROUTES from '../../ROUTES'; + export default [ { - pattern: /\/r\/*/, + pattern: `/${ROUTES.REPORT}($|(//*))`, comment: 'Reports', }, { - pattern: /\/settings\/*/, + pattern: `/${ROUTES.SETTINGS}($|(//*))`, comment: 'Profile and app settings', }, { - pattern: /\/setpassword\/*/, + pattern: '/setpassword($|(//*))', comment: 'Passoword setup', }, { - pattern: /\/details\/*/, + pattern: `/${ROUTES.DETAILS}($|(//*))`, comment: 'Details of another users', }, { - pattern: /\/v\/*/, + pattern: '/v($|(//*))', comment: 'Account validation', }, { - pattern: /\/bank-account\/*/, + pattern: `/${ROUTES.BANK_ACCOUNT}($|(//*))`, comment: 'Bank account setup and its steps', }, { - pattern: /\/iou\/*/, + pattern: '/iou($|(//*))', comment: 'I Owe You reports', }, { - pattern: /\/enable-payments\/*/, + pattern: `/${ROUTES.ENABLE_PAYMENTS}($|(//*))`, comment: 'Payments setup', }, { - pattern: /\/partners\/plaid\/oauth_ios/, - comment: 'Plaid setup', - }, - { - pattern: /\/statements\/*/, + pattern: '/statements($|(//*))', comment: 'Wallet statements', }, { - pattern: /\/concierge\/*/, + pattern: `/${ROUTES.CONCIERGE}($|(//*))`, comment: 'Concierge', }, ]; diff --git a/src/languages/es.js b/src/languages/es.js index 51570c97082b..3c9935184c3c 100644 --- a/src/languages/es.js +++ b/src/languages/es.js @@ -141,10 +141,10 @@ export default { }, deeplinkWrapper: { // TODO: translate to spanish - launching: 'Launching Expensify', - redirectedToDesktopApp: 'We\'ve redirected you to the desktop app.', - youCanAlso: 'You can also', - openLinkInBrowser: 'open this link in your browser', + launching: 'Cargando Expensify', + redirectedToDesktopApp: 'Te hemos redirigido a la aplicación de escritorio.', + youCanAlso: 'También puedes', + openLinkInBrowser: 'abrir este enlace en tu navegador', }, iOUConfirmationList: { whoPaid: '¿QUIÉN PAGO?', diff --git a/src/styles/fontFamily/index.js b/src/styles/fontFamily/index.js index f2d10bc860b9..f76b395d8dae 100644 --- a/src/styles/fontFamily/index.js +++ b/src/styles/fontFamily/index.js @@ -10,17 +10,13 @@ const fontFamily = { MONOSPACE_ITALIC: 'ExpensifyMono-Regular', MONOSPACE_BOLD: 'ExpensifyMono-Bold', MONOSPACE_BOLD_ITALIC: 'ExpensifyMono-Bold', - EMOJI_TEXT_FONT: emojiFont, -}; - -const newKansas = { NEW_KANSAS_MEDIUM: 'ExpensifyNewKansas-Meduim', NEW_KANSAS_MEDIUM_ITALIC: 'ExpensifyNewKansas-MediumItalic', + EMOJI_TEXT_FONT: emojiFont, }; export default fontFamily; export { fontFamily, - newKansas, }; diff --git a/src/styles/styles.js b/src/styles/styles.js index 8f7c466f6da8..e74e96029a86 100644 --- a/src/styles/styles.js +++ b/src/styles/styles.js @@ -2841,7 +2841,7 @@ const styles = { backgroundColor: themeColors.appBG, }, - deeplinkWrapperInfoSection: { + deeplinkWrapperMessage: { flex: 1, alignItems: 'center', justifyContent: 'center',