@liberfi.io/react-predict 0.1.32 → 0.1.34

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs CHANGED
@@ -994,18 +994,22 @@ function useSearchEvents(params, queryOptions) {
994
994
  const client = usePredictClient();
995
995
  const apiParams = useMemo(
996
996
  () => ({
997
- search: params.keyword,
997
+ search: params.keyword || void 0,
998
998
  limit: params.limit ?? 20,
999
999
  status: params.status ?? "open",
1000
1000
  source: params.source,
1001
- with_markets: params.with_markets ?? false
1001
+ with_markets: params.with_markets ?? false,
1002
+ sort_by: params.sort_by,
1003
+ sort_asc: params.sort_asc
1002
1004
  }),
1003
1005
  [
1004
1006
  params.keyword,
1005
1007
  params.limit,
1006
1008
  params.status,
1007
1009
  params.source,
1008
- params.with_markets
1010
+ params.with_markets,
1011
+ params.sort_by,
1012
+ params.sort_asc
1009
1013
  ]
1010
1014
  );
1011
1015
  return useInfiniteQuery({
@@ -1016,7 +1020,7 @@ function useSearchEvents(params, queryOptions) {
1016
1020
  }),
1017
1021
  initialPageParam: void 0,
1018
1022
  getNextPageParam: (lastPage) => lastPage.has_more && lastPage.next_cursor ? lastPage.next_cursor : void 0,
1019
- enabled: queryOptions?.enabled ?? !!params.keyword
1023
+ enabled: queryOptions?.enabled ?? true
1020
1024
  });
1021
1025
  }
1022
1026
  function similarEventsQueryKey(slug, source, params) {