mirror of
https://github.com/oceanprotocol/commons.git
synced 2023-03-15 18:03:00 +01:00
fix search
This commit is contained in:
parent
c5ea3b7c8a
commit
d80530c315
@ -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()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user