From 373a04708072387274812a8bbbdda9a4a6521851 Mon Sep 17 00:00:00 2001 From: Adam Antal Date: Fri, 19 Apr 2024 11:16:18 +0200 Subject: [PATCH] Use shouldShowInvalidSearchPage helper function in search result comp --- src/apps/search-result/search-result.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/apps/search-result/search-result.tsx b/src/apps/search-result/search-result.tsx index 37498bcc30..fe3381706a 100644 --- a/src/apps/search-result/search-result.tsx +++ b/src/apps/search-result/search-result.tsx @@ -30,6 +30,7 @@ import useFilterHandler from "./useFilterHandler"; import SearchResultSkeleton from "./search-result-skeleton"; import SearchResultZeroHits from "./search-result-zero-hits"; import SearchResultInvalidSearch from "./search-result-not-valid-search"; +import { shouldShowInvalidSearchPage } from "./helper"; interface SearchResultProps { q: string; @@ -166,7 +167,7 @@ const SearchResult: React.FC = ({ q, pageSize }) => { if (filtersUrlParam !== "usePersistedFilters") clearFilter(); }, [clearFilter]); - if (!qUrlParameter || qUrlParameter.length < 3) { + if (shouldShowInvalidSearchPage(q, qUrlParameter)) { return ; }