Changeset View
Changeset View
Standalone View
Standalone View
native/chat/compose-subchannel.react.js
Show First 20 Lines • Show All 192 Lines • ▼ Show 20 Lines | function ComposeSubchannel(props: Props): React.Node { | ||||
const otherUserInfos = useSelector(userInfoSelectorForPotentialMembers); | const otherUserInfos = useSelector(userInfoSelectorForPotentialMembers); | ||||
const userSearchIndex = useSelector(userSearchIndexForPotentialMembers); | const userSearchIndex = useSelector(userSearchIndexForPotentialMembers); | ||||
const { community } = parentThreadInfo; | const { community } = parentThreadInfo; | ||||
const communityThreadInfo = useSelector(state => | const communityThreadInfo = useSelector(state => | ||||
community ? threadInfoSelector(state)[community] : null, | community ? threadInfoSelector(state)[community] : null, | ||||
); | ); | ||||
const userSearchResults = React.useMemo( | const userSearchResults = React.useMemo( | ||||
() => | () => | ||||
getPotentialMemberItems( | getPotentialMemberItems({ | ||||
usernameInputText, | text: usernameInputText, | ||||
otherUserInfos, | userInfos: otherUserInfos, | ||||
userSearchIndex, | searchIndex: userSearchIndex, | ||||
userInfoInputIDs, | excludeUserIDs: userInfoInputIDs, | ||||
parentThreadInfo, | inputParentThreadInfo: parentThreadInfo, | ||||
communityThreadInfo, | inputCommunityThreadInfo: communityThreadInfo, | ||||
threadType, | threadType, | ||||
), | }), | ||||
[ | [ | ||||
usernameInputText, | usernameInputText, | ||||
otherUserInfos, | otherUserInfos, | ||||
userSearchIndex, | userSearchIndex, | ||||
userInfoInputIDs, | userInfoInputIDs, | ||||
parentThreadInfo, | parentThreadInfo, | ||||
communityThreadInfo, | communityThreadInfo, | ||||
threadType, | threadType, | ||||
▲ Show 20 Lines • Show All 165 Lines • Show Last 20 Lines |