Skip to content

Commit

Permalink
Use consistent type hinting
Browse files Browse the repository at this point in the history
  • Loading branch information
tgolen committed Oct 18, 2023
1 parent 0c2dd4b commit 8a3543d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/ROUTES.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import CONST from './CONST';
* @param backTo
* @returns
*/
function getBackToParam(backTo = ''): string {
function getBackToParam(backTo?: string): string {
return backTo ? `?backTo=${encodeURIComponent(backTo)}` : '';
}

Expand All @@ -30,7 +30,7 @@ export default {
},
PROFILE: {
route: 'a/:accountID',
getRoute: (accountID: string | number, backTo = '') => `a/${accountID}${getBackToParam(backTo)}`,
getRoute: (accountID: string | number, backTo?: string) => `a/${accountID}${getBackToParam(backTo)}`,
},

TRANSITION_BETWEEN_APPS: 'transition',
Expand All @@ -56,7 +56,7 @@ export default {
BANK_ACCOUNT_PERSONAL: 'bank-account/personal',
BANK_ACCOUNT_WITH_STEP_TO_OPEN: {
route: 'bank-account/:stepToOpen?',
getRoute: (stepToOpen = '', policyID = '', backTo = ''): string => `bank-account/${stepToOpen}?policyID=${policyID}${getBackToParam(backTo)}`,
getRoute: (stepToOpen = '', policyID = '', backTo?: string): string => `bank-account/${stepToOpen}?policyID=${policyID}${getBackToParam(backTo)}`,
},

SETTINGS: 'settings',
Expand Down

0 comments on commit 8a3543d

Please sign in to comment.