From 957eb3ac94a611f9dd9415c2e2f9701024a427d1 Mon Sep 17 00:00:00 2001 From: Austin Chen Date: Fri, 17 Dec 2021 23:29:42 -0800 Subject: [PATCH] Search contracts by username too --- web/components/contracts-list.tsx | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/web/components/contracts-list.tsx b/web/components/contracts-list.tsx index b1b69fc0..05762267 100644 --- a/web/components/contracts-list.tsx +++ b/web/components/contracts-list.tsx @@ -108,9 +108,12 @@ export function SearchableGrid(props: { function check(corpus: String) { return corpus.toLowerCase().includes(query.toLowerCase()) } - // TODO: Search through @username let matches = contracts.filter( - (c) => check(c.question) || check(c.description) || check(c.creatorName) + (c) => + check(c.question) || + check(c.description) || + check(c.creatorName) || + check(c.creatorUsername) ) if (sort === 'createdTime' || sort === 'resolved' || sort === 'all') {