mirror of
https://github.com/oceanprotocol/commons.git
synced 2023-03-15 18:03:00 +01:00
sort all search queries by "created"
This commit is contained in:
parent
80b77461d3
commit
48d9b26cb6
@ -41,21 +41,20 @@ export default class ChannelTeaser extends Component<
|
||||
const { ocean } = this.context
|
||||
|
||||
const searchQuery = {
|
||||
offset: 4,
|
||||
offset: 2,
|
||||
page: 1,
|
||||
query: {
|
||||
tags: [this.channel.tag]
|
||||
},
|
||||
sort: {
|
||||
datePublished: 1
|
||||
created: -1
|
||||
}
|
||||
}
|
||||
|
||||
try {
|
||||
const search = await ocean.aquarius.queryMetadata(searchQuery)
|
||||
this.setState({
|
||||
// TODO: remove hacky way of getting the latest 2 assets
|
||||
channelAssets: search.results.splice(2, 2, ''),
|
||||
channelAssets: search.results,
|
||||
isLoadingChannel: false
|
||||
})
|
||||
} catch (error) {
|
||||
|
@ -63,7 +63,7 @@ export default class Channel extends PureComponent<ChannelProps, ChannelState> {
|
||||
tags: [this.channel.tag]
|
||||
},
|
||||
sort: {
|
||||
datePublished: 1
|
||||
created: -1
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -82,7 +82,7 @@ export default class Search extends PureComponent<SearchProps, SearchState> {
|
||||
...queryValues
|
||||
},
|
||||
sort: {
|
||||
datePublished: 1
|
||||
created: -1
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user