Skip to content

Commit

Permalink
Merge pull request #38426 from Expensify/cmartins-fixDecode
Browse files Browse the repository at this point in the history
Fix category decode
  • Loading branch information
cristipaval authored Mar 15, 2024
2 parents 90ff6b8 + 0e9df90 commit 80eb3b7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/libs/Navigation/linkingConfig/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@ const config: LinkingOptions<RootStackParamList>['config'] = {
[SCREENS.WORKSPACE.CATEGORY_EDIT]: {
path: ROUTES.WORKSPACE_CATEGORY_EDIT.route,
parse: {
categoryName: (categoryName: string) => decodeURI(categoryName),
categoryName: (categoryName: string) => decodeURIComponent(categoryName),
},
},
[SCREENS.WORKSPACE.CREATE_DISTANCE_RATE]: {
Expand Down
2 changes: 1 addition & 1 deletion src/pages/workspace/categories/EditCategoryPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ type EditCategoryPageProps = WorkspaceEditCategoryPageOnyxProps & StackScreenPro
function EditCategoryPage({route, policyCategories}: EditCategoryPageProps) {
const styles = useThemeStyles();
const {translate} = useLocalize();
const currentCategoryName = decodeURIComponent(route.params.categoryName);
const currentCategoryName = route.params.categoryName;

const editCategory = useCallback(
(values: FormOnyxValues<typeof ONYXKEYS.FORMS.WORKSPACE_CATEGORY_FORM>) => {
Expand Down

0 comments on commit 80eb3b7

Please sign in to comment.