feat: filter out account from members
This commit is contained in:
parent
ca5bd55129
commit
98e340a39a
|
@ -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…
Reference in New Issue