Search contracts by username too
This commit is contained in:
parent
77e15e3aa8
commit
957eb3ac94
|
@ -108,9 +108,12 @@ export function SearchableGrid(props: {
|
||||||
function check(corpus: String) {
|
function check(corpus: String) {
|
||||||
return corpus.toLowerCase().includes(query.toLowerCase())
|
return corpus.toLowerCase().includes(query.toLowerCase())
|
||||||
}
|
}
|
||||||
// TODO: Search through @username
|
|
||||||
let matches = contracts.filter(
|
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') {
|
if (sort === 'createdTime' || sort === 'resolved' || sort === 'all') {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user