Skip to content

Commit

Permalink
Move shouldShowInvalidSearchPage helper function to the helper file
Browse files Browse the repository at this point in the history
  • Loading branch information
Adamik10 committed Apr 19, 2024
1 parent 5bb8240 commit 56d1264
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/apps/search-result/helper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,13 @@ export const getFirstMaterialTypeFromFilters = (
: undefined;
};

export const shouldShowInvalidSearchPage = (
q: string,
qUrlParameter: string | null
) => {
return (
(!qUrlParameter && !q) || (!qUrlParameter && q === "null") || q.length < 3
);
};

export default {};

0 comments on commit 56d1264

Please sign in to comment.