mirror of
https://github.com/oceanprotocol/commons.git
synced 2023-03-15 18:03:00 +01:00
category search fixes
This commit is contained in:
parent
a283cd162b
commit
f9e367bfbc
@ -40,16 +40,11 @@ export default class Search extends PureComponent<SearchProps, SearchState> {
|
|||||||
|
|
||||||
public async componentDidMount() {
|
public async componentDidMount() {
|
||||||
const { search } = this.props.location
|
const { search } = this.props.location
|
||||||
.text
|
|
||||||
const searchPage = await queryString.parse(this.props.location.search)
|
|
||||||
.page
|
|
||||||
const { text, page, categories } = queryString.parse(search)
|
const { text, page, categories } = queryString.parse(search)
|
||||||
this.props.location.search
|
|
||||||
).categories
|
|
||||||
|
|
||||||
if (text) {
|
if (text) {
|
||||||
await this.setState({
|
await this.setState({
|
||||||
searchTerm: encodeURIComponent(`${text}`)
|
searchTerm: `${text}`
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -84,7 +79,6 @@ export default class Search extends PureComponent<SearchProps, SearchState> {
|
|||||||
page: currentPage,
|
page: currentPage,
|
||||||
query: {
|
query: {
|
||||||
...queryValues,
|
...queryValues,
|
||||||
categories: [decodeURIComponent(searchCategories)],
|
|
||||||
price: [-1, 1]
|
price: [-1, 1]
|
||||||
},
|
},
|
||||||
sort: {
|
sort: {
|
||||||
|
Loading…
Reference in New Issue
Block a user