File tree Expand file tree Collapse file tree 1 file changed +9
-3
lines changed
apps/explorer/src/app/[network] Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -34,8 +34,14 @@ export default function Network() {
3434 } , [ ] )
3535
3636 const filterGroups = useCallback (
37- ( groupId : string ) => {
38- const groups = allGroups . filter ( ( group ) => ( ! groupId ? true : group . id . includes ( groupId ) ) )
37+ ( groupIdOrAdmin : string ) => {
38+ let groups : GroupResponse [ ]
39+ if ( groupIdOrAdmin . startsWith ( "0x" ) ) {
40+ groupIdOrAdmin = groupIdOrAdmin . toLowerCase ( )
41+ groups = allGroups . filter ( ( group ) => ( ! groupIdOrAdmin ? true : group . admin ?. includes ( groupIdOrAdmin ) ) )
42+ } else {
43+ groups = allGroups . filter ( ( group ) => ( ! groupIdOrAdmin ? true : group . id . includes ( groupIdOrAdmin ) ) )
44+ }
3945
4046 setFilteredGroups ( groups )
4147 } ,
@@ -49,7 +55,7 @@ export default function Network() {
4955 ) : (
5056 allGroups && (
5157 < div className = "mx-auto max-w-7xl px-4 lg:px-8 pt-20" >
52- < SearchBar className = "mb-6" placeholder = "Group ID" onChange = { filterGroups } />
58+ < SearchBar className = "mb-6" placeholder = "Group ID, Admin " onChange = { filterGroups } />
5359
5460 < div className = "flex justify-center flex-col pb-10 font-[family-name:var(--font-geist-sans)]" >
5561 < ul className = "divide-y divide-gray-300 min-w-xl" >
You can’t perform that action at this time.
0 commit comments