From 8773bf762456e8195cc9e8520089cd24949ab041 Mon Sep 17 00:00:00 2001 From: James Grugett Date: Sun, 13 Mar 2022 12:13:26 -0500 Subject: [PATCH] Default feed excluded tags are case insensitive --- web/hooks/use-find-active-contracts.ts | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/web/hooks/use-find-active-contracts.ts b/web/hooks/use-find-active-contracts.ts index e6f849f6..bb7f9bd7 100644 --- a/web/hooks/use-find-active-contracts.ts +++ b/web/hooks/use-find-active-contracts.ts @@ -25,7 +25,7 @@ export const getAllContractInfo = async () => { return { contracts, recentComments, folds } } -const defaultSkippedTags = [ +const defaultExcludedTags = [ 'meta', 'test', 'trolling', @@ -34,10 +34,11 @@ const defaultSkippedTags = [ 'personal', ] const includedWithDefaultFeed = (contract: Contract) => { - const { tags } = contract + const { lowercaseTags } = contract - if (tags.length === 0) return false - if (tags.some((tag) => defaultSkippedTags.includes(tag))) return false + if (lowercaseTags.length === 0) return false + if (lowercaseTags.some((tag) => defaultExcludedTags.includes(tag))) + return false return true }