mirror of
https://github.com/oceanprotocol/commons.git
synced 2023-03-15 18:03:00 +01:00
improve empty search view
This commit is contained in:
parent
f8cff63c79
commit
66655adbf5
@ -24,3 +24,9 @@
|
||||
grid-template-columns: repeat(3, 1fr);
|
||||
}
|
||||
}
|
||||
|
||||
.empty {
|
||||
text-align: center;
|
||||
margin-top: $spacer * 4;
|
||||
color: $brand-grey-light;
|
||||
}
|
||||
|
@ -1,4 +1,5 @@
|
||||
import React, { PureComponent } from 'react'
|
||||
import { Link } from 'react-router-dom'
|
||||
import queryString from 'query-string'
|
||||
import { History, Location } from 'history'
|
||||
import { Logger } from '@oceanprotocol/squid'
|
||||
@ -123,7 +124,10 @@ export default class Search extends PureComponent<SearchProps, SearchState> {
|
||||
))}
|
||||
</div>
|
||||
) : (
|
||||
<div>No data sets found.</div>
|
||||
<div className={styles.empty}>
|
||||
<p>No Data Sets Found.</p>
|
||||
<Link to="/publish">+ Publish A Data Set</Link>
|
||||
</div>
|
||||
)
|
||||
|
||||
public render() {
|
||||
@ -132,16 +136,16 @@ 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.isLoading && (
|
||||
<h2 className={styles.resultsTitle}>
|
||||
{totalResults} results for{' '}
|
||||
<span>
|
||||
{decodeURIComponent(
|
||||
this.state.searchTerm ||
|
||||
this.state.searchCategories
|
||||
)}</span>`
|
||||
}}
|
||||
/>
|
||||
)}
|
||||
</span>
|
||||
</h2>
|
||||
)}
|
||||
{this.renderResults()}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user