1
0
mirror of https://github.com/oceanprotocol/commons.git synced 2023-03-15 18:03:00 +01:00

search fix

This commit is contained in:
Jernej Pregelj 2019-02-19 10:19:30 +01:00
parent 7abb3741fc
commit e0126e7237

View File

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