1
0
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:
Matthias Kretschmann 2019-05-15 16:58:57 +02:00
parent a283cd162b
commit f9e367bfbc
Signed by: m
GPG Key ID: 606EEEF3C479A91F

View File

@ -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: {