mirror of
https://github.com/status-im/ETHReport.git
synced 2025-01-20 19:29:54 +00:00
Fix click search
This commit is contained in:
parent
f739a64f96
commit
111191ed02
@ -17,7 +17,7 @@ class BrowseArchives extends React.Component {
|
||||
this.state = {
|
||||
term: '',
|
||||
debounceTerm: '',
|
||||
searchResults: [],
|
||||
searchResults: [null],
|
||||
isSingleInterviewModalOpen: false,
|
||||
isInterviewsListModalOpen: false,
|
||||
activeSingleInterviewId: 1,
|
||||
@ -39,7 +39,7 @@ class BrowseArchives extends React.Component {
|
||||
this.setState({
|
||||
term: event.target.value,
|
||||
isSearchActive: true,
|
||||
searchResults: [],
|
||||
searchResults: [null],
|
||||
});
|
||||
|
||||
if (event.target.value.length === 0) {
|
||||
|
@ -4,8 +4,10 @@ import './style.scss';
|
||||
import Parser from 'html-react-parser';
|
||||
|
||||
const SearchResults = (props) => {
|
||||
if (!props.data || props.data.length < 1) {
|
||||
if (!props.data || props.data[0] === null) {
|
||||
return <div>Loading...</div>;
|
||||
} else if (props.data.length < 1) {
|
||||
return <div> No results found </div>;
|
||||
}
|
||||
|
||||
// sort array alphabetically
|
||||
|
Loading…
x
Reference in New Issue
Block a user