Skip to content

Commit

Permalink
fix: ts issues
Browse files Browse the repository at this point in the history
  • Loading branch information
ArekChr committed Mar 12, 2024
1 parent 7329493 commit cbdfe08
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/pages/workspace/categories/WorkspaceCategoriesPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,10 @@ import type SCREENS from '@src/SCREENS';
import type * as OnyxTypes from '@src/types/onyx';
import type DeepValueOf from '@src/types/utils/DeepValueOf';

type PolicyOption = ListItem;
type PolicyOption = ListItem & {
/** Category name is used as a key for the selectedCategories state */
keyForList: string;
};

type WorkspaceCategoriesOnyxProps = {
/** The policy the user is accessing. */
Expand Down Expand Up @@ -134,7 +137,7 @@ function WorkspaceCategoriesPage({policy, policyCategories, route}: WorkspaceCat
);

const navigateToCategorySettings = (category: PolicyOption) => {
Navigation.navigate(ROUTES.WORKSPACE_CATEGORY_SETTINGS.getRoute(route.params.policyID, category.text));
Navigation.navigate(ROUTES.WORKSPACE_CATEGORY_SETTINGS.getRoute(route.params.policyID, category.keyForList));
};

const navigateToCategoriesSettings = () => {
Expand Down

0 comments on commit cbdfe08

Please sign in to comment.