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

fix search

This commit is contained in:
Matthias Kretschmann 2019-12-13 12:22:52 +01:00
parent c5ea3b7c8a
commit d80530c315
Signed by: m
GPG Key ID: 606EEEF3C479A91F

View File

@ -41,13 +41,13 @@ class Search extends PureComponent<SearchProps, SearchState> {
const { text, page, categories } = queryString.parse(search) const { text, page, categories } = queryString.parse(search)
if (text) { if (text) {
this.setState({ await this.setState({
searchTerm: decodeURIComponent(`${text}`) searchTerm: decodeURIComponent(`${text}`)
}) })
} }
if (categories) { if (categories) {
this.setState({ await this.setState({
searchCategories: decodeURIComponent(`${categories}`) searchCategories: decodeURIComponent(`${categories}`)
}) })
} }
@ -55,7 +55,7 @@ class Search extends PureComponent<SearchProps, SearchState> {
// switch to respective page if query string is present // switch to respective page if query string is present
if (page) { if (page) {
const currentPage = Number(page) const currentPage = Number(page)
this.setState({ currentPage }) await this.setState({ currentPage })
} }
this.searchAssets() this.searchAssets()