From 28a2ba88c10ebfa0b56488e55c0c2f7e981f2775 Mon Sep 17 00:00:00 2001 From: mihaisc Date: Mon, 25 Oct 2021 09:30:34 -0700 Subject: [PATCH] fix sorting (#934) Signed-off-by: mihaisc --- src/components/pages/Home.tsx | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/components/pages/Home.tsx b/src/components/pages/Home.tsx index e554ac793..9fac2b81a 100644 --- a/src/components/pages/Home.tsx +++ b/src/components/pages/Home.tsx @@ -10,13 +10,12 @@ import { import Permission from '../organisms/Permission' import { getHighestLiquidityDatatokens } from '../../utils/subgraph' import { DDO, Logger } from '@oceanprotocol/lib' -import { useSiteMetadata } from '../../hooks/useSiteMetadata' import { useUserPreferences } from '../../providers/UserPreferences' import styles from './Home.module.css' import { useIsMounted } from '../../hooks/useIsMounted' import { useCancelToken } from '../../hooks/useCancelToken' import { SearchQuery } from '../../models/aquarius/SearchQuery' -import { SortTermOptions } from '../../models/SortAndFilters' +import { SortOptions, SortTermOptions } from '../../models/SortAndFilters' import { BaseQueryParams } from '../../models/aquarius/BaseQueryParams' import { PagedAssets } from '../../models/PagedAssets' @@ -120,7 +119,9 @@ export default function HomePage(): ReactElement { const baseParams = { chainIds: chainIds, esPaginationOptions: { size: 9 }, - sort: { sortBy: SortTermOptions.Created } + sortOptions: { + sortBy: SortTermOptions.Created + } as SortOptions } as BaseQueryParams setQueryLatest(generateBaseQuery(baseParams))