Skip to content

Commit

Permalink
Remove SEARCH_QUERIES const
Browse files Browse the repository at this point in the history
  • Loading branch information
WojtekBoman committed Apr 16, 2024
1 parent f84911b commit 8ea25e3
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 11 deletions.
6 changes: 0 additions & 6 deletions src/CONST.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4345,12 +4345,6 @@ const CONST = {

MAX_TAX_RATE_INTEGER_PLACES: 4,
MAX_TAX_RATE_DECIMAL_PLACES: 4,

SEARCH_QUERIES: {
ALL: 'all',
SENT: 'sent',
DRAFTS: 'drafts'
}
} as const;

type Country = keyof typeof CONST.ALL_COUNTRIES;
Expand Down
2 changes: 1 addition & 1 deletion src/components/TestToolMenu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ function TestToolMenu({user = USER_DEFAULT, network}: TestToolMenuProps) {
small
text="Navigate"
onPress={() => {
Navigation.navigate(ROUTES.SEARCH.getRoute(CONST.SEARCH_QUERIES.ALL));
Navigation.navigate(ROUTES.SEARCH.getRoute(CONST.TAB_SEARCH.ALL));
}}
/>
</TestToolRow>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ function BottomTabBar({isLoadingApp = false}: PurposeForUsingExpensifyModalProps
{/* <Tooltip text={translate('common.search')}>
<PressableWithFeedback
onPress={() => {
Navigation.navigate(ROUTES.SEARCH.getRoute(CONST.SEARCH_QUERIES.ALL));
Navigation.navigate(ROUTES.SEARCH.getRoute(CONST.TAB_SEARCH.ALL));
}}
role={CONST.ROLE.BUTTON}
accessibilityLabel={translate('common.search')}
Expand Down
6 changes: 3 additions & 3 deletions src/pages/Search/SearchPageBottomTab.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,17 +27,17 @@ function SearchPageBottomTab() {
{
title: 'All',
icon: Expensicons.ExpensifyLogoNew,
action: singleExecution(() => Navigation.navigate(ROUTES.SEARCH.getRoute(CONST.SEARCH_QUERIES.ALL))),
action: singleExecution(() => Navigation.navigate(ROUTES.SEARCH.getRoute(CONST.TAB_SEARCH.ALL))),
},
{
title: 'Sent',
icon: Expensicons.ExpensifyLogoNew,
action: singleExecution(() => Navigation.navigate(ROUTES.SEARCH.getRoute(CONST.SEARCH_QUERIES.SENT))),
action: singleExecution(() => Navigation.navigate(ROUTES.SEARCH.getRoute(CONST.TAB_SEARCH.SENT))),
},
{
title: 'Drafts',
icon: Expensicons.ExpensifyLogoNew,
action: singleExecution(() => Navigation.navigate(ROUTES.SEARCH.getRoute(CONST.SEARCH_QUERIES.DRAFTS))),
action: singleExecution(() => Navigation.navigate(ROUTES.SEARCH.getRoute(CONST.TAB_SEARCH.DRAFTS))),
},
];

Expand Down

0 comments on commit 8ea25e3

Please sign in to comment.