Skip to content

Commit

Permalink
[CleanCode]store boolean condition into self-describe variable
Browse files Browse the repository at this point in the history
  • Loading branch information
pH-7 committed May 14, 2024
1 parent 9e6600c commit d9e41a8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion client/components/SearchForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,9 @@ function useQueryCount() {

useEffect(() => {
localStorage.setItem("queryCount", queryCount.toString());
const isQueryReached = queryCount >= Search.MAXIMUM_FREE_QUERIES_PER_HOUR;
setIsQueryLimitReached(
queryCount >= Search.QUERY_LIMIT && !isUserSubscribed,
queryCount >= Search.MAXIMUM_FREE_QUERIES_PER_HOUR && !isUserSubscribed,
);
}, [queryCount, isUserSubscribed]);

Expand Down

0 comments on commit d9e41a8

Please sign in to comment.