Commit 8fb7dab4 authored by tom's avatar tom

i am stupid

parent c7cb8410
......@@ -23,11 +23,11 @@ export default function useSearchQuery(isSearchPage = false) {
});
const redirectCheckQuery = useApiQuery('search_check_redirect', {
queryParams: { q: q.current },
// on search result page we check redirect only once on mount
// on pages with regular search bar we check redirect on every search term change
// in order to prepend its result to suggest list since this resource is much faster than regular search
queryOptions: { enabled: Boolean(isSearchPage ? q : debouncedSearchTerm) },
queryParams: { q: isSearchPage ? q.current : debouncedSearchTerm },
queryOptions: { enabled: Boolean(isSearchPage ? q.current : debouncedSearchTerm) },
});
useUpdateValueEffect(() => {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment