Skip to content

Commit

Permalink
Fixed PR comments
Browse files Browse the repository at this point in the history
  • Loading branch information
cowboycito committed Dec 17, 2022
1 parent b1b9ba6 commit 90a4e1b
Show file tree
Hide file tree
Showing 6 changed files with 26 additions and 32 deletions.
4 changes: 2 additions & 2 deletions desktop/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
12 changes: 6 additions & 6 deletions src/components/DeeplinkWrapper/DeeplinkWrapper.website.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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) {
Expand All @@ -90,7 +90,7 @@ class DeeplinkWrapper extends PureComponent {
iframe.parentNode.removeChild(iframe);
}, 100);
} else {
window.location.href = expenfifyDeeplinkUrl;
window.location.href = expensifyDeeplinkUrl;
}
}

Expand All @@ -114,15 +114,15 @@ class DeeplinkWrapper extends PureComponent {
) {
return (
<View style={styles.deeplinkWrapperContainer}>
<View style={styles.deeplinkWrapperInfoSection}>
<View style={styles.deeplinkWrapperMessage}>
<View style={styles.mb2}>
<Icon
width={200}
height={164}
src={Illustrations.RocketBlue}
/>
</View>
<Text style={[styles.textXXLarge, {fontFamily: FontFamily.newKansas.NEW_KANSAS_MEDIUM}]}>
<Text style={[styles.textXXLarge, {fontFamily: FontFamily.fontFamily.NEW_KANSAS_MEDIUM}]}>
{this.props.translate('deeplinkWrapper.launching')}
</Text>
<View style={styles.mt2}>
Expand Down
26 changes: 12 additions & 14 deletions src/components/DeeplinkWrapper/deeplinkRoutes.js
Original file line number Diff line number Diff line change
@@ -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',
},
];
Expand Down
8 changes: 4 additions & 4 deletions src/languages/es.js
Original file line number Diff line number Diff line change
Expand Up @@ -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?',
Expand Down
6 changes: 1 addition & 5 deletions src/styles/fontFamily/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
};
2 changes: 1 addition & 1 deletion src/styles/styles.js
Original file line number Diff line number Diff line change
Expand Up @@ -2841,7 +2841,7 @@ const styles = {
backgroundColor: themeColors.appBG,
},

deeplinkWrapperInfoSection: {
deeplinkWrapperMessage: {
flex: 1,
alignItems: 'center',
justifyContent: 'center',
Expand Down

0 comments on commit 90a4e1b

Please sign in to comment.