Skip to content

Commit

Permalink
refactor: move inbox url to the const
Browse files Browse the repository at this point in the history
  • Loading branch information
barttom committed Jan 15, 2024
1 parent d3da565 commit cc02642
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
3 changes: 3 additions & 0 deletions src/CONST.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,

Expand Down
6 changes: 2 additions & 4 deletions src/pages/settings/InitialSettingsPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -128,8 +128,6 @@ const defaultProps = {
...withCurrentUserPersonalDetailsDefaultProps,
};

const INBOX_URL = 'inbox';

function InitialSettingsPage(props) {
const theme = useTheme();
const styles = useThemeStyles();
Expand Down Expand Up @@ -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',
Expand Down
2 changes: 1 addition & 1 deletion src/pages/settings/Wallet/ExpensifyCardPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand Down

0 comments on commit cc02642

Please sign in to comment.