mirror of
https://github.com/status-im/status-web-archive.git
synced 2025-01-09 15:46:00 +00:00
feat: filter out account from members
This commit is contained in:
parent
38fabb3e18
commit
6d5d6ab498
@ -2,9 +2,14 @@ import { useProtocol } from '~/src/protocol'
|
||||
|
||||
import type { Member } from '@status-im/js'
|
||||
|
||||
// todo: remove in favor of useCommunity
|
||||
export const useMembers = (): Member[] => {
|
||||
const { client } = useProtocol()
|
||||
const { client, account } = useProtocol()
|
||||
|
||||
if (account) {
|
||||
return client.community.members.filter(
|
||||
member => member.publicKey !== '0x' + account.publicKey
|
||||
)
|
||||
}
|
||||
|
||||
return client.community.members
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user