lint fixes

This commit is contained in:
Sol
2020-08-04 21:04:52 +01:00
committed by Sol Abrahams
parent bdc683aa1d
commit 0602eb1593
2 changed files with 2 additions and 2 deletions

View File

@@ -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({

View File

@@ -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'))