Skip to content

Commit

Permalink
Merge pull request #39893 from gijoe0295/gijoe/39614
Browse files Browse the repository at this point in the history
Fix: Not here page shows up when opening tax with special characters
  • Loading branch information
stitesExpensify authored Apr 9, 2024
2 parents 0fa1368 + 6ea5ed9 commit 1073b33
Show file tree
Hide file tree
Showing 2 changed files with 12 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 @@ -648,15 +648,15 @@ const ROUTES = {
},
WORKSPACE_TAX_EDIT: {
route: 'settings/workspaces/:policyID/tax/:taxID',
getRoute: (policyID: string, taxID: string) => `settings/workspaces/${policyID}/tax/${encodeURI(taxID)}` as const,
getRoute: (policyID: string, taxID: string) => `settings/workspaces/${policyID}/tax/${encodeURIComponent(taxID)}` as const,
},
WORKSPACE_TAX_NAME: {
route: 'settings/workspaces/:policyID/tax/:taxID/name',
getRoute: (policyID: string, taxID: string) => `settings/workspaces/${policyID}/tax/${encodeURI(taxID)}/name` as const,
getRoute: (policyID: string, taxID: string) => `settings/workspaces/${policyID}/tax/${encodeURIComponent(taxID)}/name` as const,
},
WORKSPACE_TAX_VALUE: {
route: 'settings/workspaces/:policyID/tax/:taxID/value',
getRoute: (policyID: string, taxID: string) => `settings/workspaces/${policyID}/tax/${encodeURI(taxID)}/value` as const,
getRoute: (policyID: string, taxID: string) => `settings/workspaces/${policyID}/tax/${encodeURIComponent(taxID)}/value` as const,
},
WORKSPACE_DISTANCE_RATES: {
route: 'settings/workspaces/:policyID/distance-rates',
Expand Down
9 changes: 9 additions & 0 deletions src/libs/Navigation/linkingConfig/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -399,12 +399,21 @@ const config: LinkingOptions<RootStackParamList>['config'] = {
},
[SCREENS.WORKSPACE.TAX_EDIT]: {
path: ROUTES.WORKSPACE_TAX_EDIT.route,
parse: {
taxID: (taxID: string) => decodeURIComponent(taxID),
},
},
[SCREENS.WORKSPACE.TAX_NAME]: {
path: ROUTES.WORKSPACE_TAX_NAME.route,
parse: {
taxID: (taxID: string) => decodeURIComponent(taxID),
},
},
[SCREENS.WORKSPACE.TAX_VALUE]: {
path: ROUTES.WORKSPACE_TAX_VALUE.route,
parse: {
taxID: (taxID: string) => decodeURIComponent(taxID),
},
},
},
},
Expand Down

0 comments on commit 1073b33

Please sign in to comment.