From 4ca1d33d65a70c6a8aafd700764946d40ea87317 Mon Sep 17 00:00:00 2001 From: jahooma Date: Thu, 27 Jan 2022 15:11:29 -0600 Subject: [PATCH] Make tag page check lowercase tag field --- web/pages/tag/[tag].tsx | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/web/pages/tag/[tag].tsx b/web/pages/tag/[tag].tsx index f226783c..baa87300 100644 --- a/web/pages/tag/[tag].tsx +++ b/web/pages/tag/[tag].tsx @@ -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({