From 492c96b3318b81f4aa16661b2fa687e6765d183e Mon Sep 17 00:00:00 2001 From: Anusha Date: Thu, 10 Oct 2024 19:48:07 +0500 Subject: [PATCH] fix search param --- src/pages/Search/SearchPageBottomTab.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/pages/Search/SearchPageBottomTab.tsx b/src/pages/Search/SearchPageBottomTab.tsx index c72462d1f66e..f61fc9250378 100644 --- a/src/pages/Search/SearchPageBottomTab.tsx +++ b/src/pages/Search/SearchPageBottomTab.tsx @@ -61,7 +61,8 @@ function SearchPageBottomTab() { const searchParams = activeCentralPaneRoute?.params as AuthScreensParamList[typeof SCREENS.SEARCH.CENTRAL_PANE]; const parsedQuery = SearchUtils.buildSearchQueryJSON(searchParams?.q); - const searchName = searchParams?.name; + const isSearchNameModified = searchParams?.name === searchParams?.q; + const searchName = isSearchNameModified ? undefined : searchParams?.name; const policyIDFromSearchQuery = parsedQuery && SearchUtils.getPolicyIDFromSearchQuery(parsedQuery); const isActiveCentralPaneRoute = activeCentralPaneRoute?.name === SCREENS.SEARCH.CENTRAL_PANE; const queryJSON = isActiveCentralPaneRoute ? parsedQuery : undefined;