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'
|
import type { Member } from '@status-im/js'
|
||||||
|
|
||||||
// todo: remove in favor of useCommunity
|
|
||||||
export const useMembers = (): Member[] => {
|
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
|
return client.community.members
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue