Search through charity preview, description, and tags too
This commit is contained in:
parent
9480f9f34c
commit
b42e77858f
|
@ -40,8 +40,12 @@ export default function Charity(props: {
|
|||
|
||||
const filterCharities = useMemo(
|
||||
() =>
|
||||
charities.filter((charity) =>
|
||||
charity.name.toLowerCase().includes(query.toLowerCase())
|
||||
charities.filter(
|
||||
(charity) =>
|
||||
charity.name.toLowerCase().includes(query.toLowerCase()) ||
|
||||
charity.preview.toLowerCase().includes(query.toLowerCase()) ||
|
||||
charity.description.toLowerCase().includes(query.toLowerCase()) ||
|
||||
(charity.tags as string[])?.includes(query.toLowerCase())
|
||||
),
|
||||
[query]
|
||||
)
|
||||
|
|
Loading…
Reference in New Issue
Block a user