Make tag page check lowercase tag field

This commit is contained in:
jahooma 2022-01-27 15:11:29 -06:00
parent 6e2d16225e
commit 4ca1d33d65

View File

@ -27,10 +27,8 @@ export default function TagPage(props: { contracts: Contract[] }) {
const contracts = useContracts()
const taggedContracts = (contracts ?? props.contracts).filter(
(contract) =>
contract.description.toLowerCase().includes(`#${tag.toLowerCase()}`) ||
contract.question.toLowerCase().includes(`#${tag.toLowerCase()}`)
const taggedContracts = (contracts ?? props.contracts).filter((contract) =>
contract.lowercaseTags.includes(tag.toLowerCase())
)
const { query, setQuery, sort, setSort } = useQueryAndSortParams({