Search contracts by username too

This commit is contained in:
Austin Chen 2021-12-17 23:29:42 -08:00
parent 77e15e3aa8
commit 957eb3ac94

View File

@ -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') {