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

Merge pull request #21 from oceanprotocol/fix/search-update

search fix
This commit is contained in:
Jernej Pregelj 2019-02-19 10:41:23 +01:00 committed by GitHub
commit 88083bebf1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -19,16 +19,7 @@ export default class Search extends Component<SearchProps, SearchState> {
public async componentDidMount() {
const searchParams = queryString.parse(this.props.location.search)
const queryRequest: any = {
offset: 100,
page: 0,
query: {
$text: {
$search: searchParams.q
}
}
}
const assets = await this.context.ocean.searchAssets(queryRequest)
const assets = await this.context.ocean.assets.search(searchParams.q)
this.setState({ results: assets })
}