1
0
mirror of https://github.com/oceanprotocol/market.git synced 2024-12-02 05:57:29 +01:00

fix sorting (#934)

Signed-off-by: mihaisc <mihai.scarlat@smartcontrol.ro>
This commit is contained in:
mihaisc 2021-10-25 09:30:34 -07:00 committed by GitHub
parent cef0969065
commit 28a2ba88c1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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))