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
|
||||
.map((category: string) => (
|
||||
<Link
|
||||
to={`/search?categories=${category}`}
|
||||
to={`/search?categories=${encodeURIComponent(
|
||||
category
|
||||
)}`}
|
||||
key={category}
|
||||
className={styles.category}
|
||||
>
|
||||
|
@ -44,13 +44,13 @@ export default class Search extends PureComponent<SearchProps, SearchState> {
|
||||
|
||||
if (text) {
|
||||
await this.setState({
|
||||
searchTerm: encodeURIComponent(`${text}`)
|
||||
searchTerm: decodeURIComponent(`${text}`)
|
||||
})
|
||||
}
|
||||
|
||||
if (categories) {
|
||||
await this.setState({
|
||||
searchCategories: encodeURIComponent(`${categories}`)
|
||||
searchCategories: decodeURIComponent(`${categories}`)
|
||||
})
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user