mirror of
https://github.com/oceanprotocol/commons.git
synced 2023-03-15 18:03:00 +01:00
fix category search
This commit is contained in:
parent
9e15845995
commit
f8cff63c79
@ -84,7 +84,9 @@ export default class Home extends Component<HomeProps, HomeState> {
|
|||||||
.sort((a, b) => a.localeCompare(b)) // sort alphabetically
|
.sort((a, b) => a.localeCompare(b)) // sort alphabetically
|
||||||
.map((category: string) => (
|
.map((category: string) => (
|
||||||
<Link
|
<Link
|
||||||
to={`/search?categories=${category}`}
|
to={`/search?categories=${encodeURIComponent(
|
||||||
|
category
|
||||||
|
)}`}
|
||||||
key={category}
|
key={category}
|
||||||
className={styles.category}
|
className={styles.category}
|
||||||
>
|
>
|
||||||
|
@ -44,13 +44,13 @@ export default class Search extends PureComponent<SearchProps, SearchState> {
|
|||||||
|
|
||||||
if (text) {
|
if (text) {
|
||||||
await this.setState({
|
await this.setState({
|
||||||
searchTerm: encodeURIComponent(`${text}`)
|
searchTerm: decodeURIComponent(`${text}`)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
if (categories) {
|
if (categories) {
|
||||||
await this.setState({
|
await this.setState({
|
||||||
searchCategories: encodeURIComponent(`${categories}`)
|
searchCategories: decodeURIComponent(`${categories}`)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user