mirror of
https://github.com/bellingcat/ukraine-timemap.git
synced 2026-06-12 13:28:36 +03:00
lint fixes
This commit is contained in:
@@ -34,7 +34,7 @@ class Search extends React.Component {
|
||||
searchResults = []
|
||||
} else {
|
||||
searchResults = this.props.events.filter(event =>
|
||||
event.description.toLowerCase().includes(queryString.toLowerCase()) || event.location.toLowerCase().includes(queryString.toLowerCase()) || event.category.toLowerCase().includes(queryString.toLowerCase()) || event.date.includes(queryString)
|
||||
event.description.toLowerCase().includes(queryString.toLowerCase()) || event.location.toLowerCase().includes(queryString.toLowerCase()) || event.category.toLowerCase().includes(queryString.toLowerCase()) || event.date.includes(queryString)
|
||||
)
|
||||
}
|
||||
this.setState({
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import React from 'react'
|
||||
|
||||
const SearchRow = ({ query, eventObj, onSearchRowClick }) => {
|
||||
const { description, category, location, date } = eventObj
|
||||
const { description, location, date } = eventObj
|
||||
function getHighlightedText (text, highlight) {
|
||||
// Split text on highlight term, include term itself into parts, ignore case
|
||||
const parts = text.split(new RegExp(`(${highlight})`, 'gi'))
|
||||
|
||||
Reference in New Issue
Block a user