mirror of
https://github.com/enso-org/enso.git
synced 2024-11-26 08:52:58 +03:00
Fix broken MembersTable (#10300)
This commit is contained in:
parent
07955f870b
commit
0b4ea9a9fe
@ -46,11 +46,14 @@ export default function MembersTable(props: MembersTableProps) {
|
|||||||
() => (user == null ? null : { isPlaceholder: false, ...user }),
|
() => (user == null ? null : { isPlaceholder: false, ...user }),
|
||||||
[user]
|
[user]
|
||||||
)
|
)
|
||||||
|
|
||||||
|
const backendListUsers = backendHooks.useBackendListUsers(backend)
|
||||||
|
|
||||||
const users = React.useMemo(
|
const users = React.useMemo(
|
||||||
() =>
|
() =>
|
||||||
backendHooks.useBackendListUsers(backend) ??
|
backendListUsers ??
|
||||||
(populateWithSelf && userWithPlaceholder != null ? [userWithPlaceholder] : null),
|
(populateWithSelf && userWithPlaceholder != null ? [userWithPlaceholder] : null),
|
||||||
[backend, populateWithSelf, userWithPlaceholder]
|
[backendListUsers, populateWithSelf, userWithPlaceholder]
|
||||||
)
|
)
|
||||||
const usersMap = React.useMemo(
|
const usersMap = React.useMemo(
|
||||||
() => new Map((users ?? []).map(member => [member.userId, member])),
|
() => new Map((users ?? []).map(member => [member.userId, member])),
|
||||||
|
Loading…
Reference in New Issue
Block a user