mirror of
https://github.com/oceanprotocol/commons.git
synced 2023-03-15 18:03:00 +01:00
commit
88083bebf1
@ -19,16 +19,7 @@ export default class Search extends Component<SearchProps, SearchState> {
|
|||||||
|
|
||||||
public async componentDidMount() {
|
public async componentDidMount() {
|
||||||
const searchParams = queryString.parse(this.props.location.search)
|
const searchParams = queryString.parse(this.props.location.search)
|
||||||
const queryRequest: any = {
|
const assets = await this.context.ocean.assets.search(searchParams.q)
|
||||||
offset: 100,
|
|
||||||
page: 0,
|
|
||||||
query: {
|
|
||||||
$text: {
|
|
||||||
$search: searchParams.q
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
const assets = await this.context.ocean.searchAssets(queryRequest)
|
|
||||||
this.setState({ results: assets })
|
this.setState({ results: assets })
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user