1
0
mirror of https://github.com/oceanprotocol/commons.git synced 2023-03-15 18:03:00 +01:00

merge fix

This commit is contained in:
Matthias Kretschmann 2019-05-17 01:42:34 +02:00
parent a94d7e1b6c
commit 9540236ef0
Signed by: m
GPG Key ID: 606EEEF3C479A91F

View File

@ -44,14 +44,13 @@ export default class Search extends PureComponent<SearchProps, SearchState> {
if (text) {
await this.setState({
searchTerm: `${text}`
searchTerm: encodeURIComponent(`${text}`)
})
}
if (categories) {
await this.setState({
searchTerm: encodeURIComponent(`${searchTerm}`),
searchCategories: `${categories}`
searchCategories: encodeURIComponent(`${categories}`)
})
}
@ -133,13 +132,13 @@ export default class Search extends PureComponent<SearchProps, SearchState> {
return (
<Route title="Search" wide>
<Content wide>
{totalResults > 0 && (
<h2
className={styles.resultsTitle}
dangerouslySetInnerHTML={{
__html: `${totalResults} results for <span>${decodeURIComponent(
this.state.searchTerm
)}</span>`
{totalResults > 0 && (
<h2
className={styles.resultsTitle}
dangerouslySetInnerHTML={{
__html: `${totalResults} results for <span>${decodeURIComponent(
this.state.searchTerm
)}</span>`
}}
/>
)}