Changeset View
Changeset View
Standalone View
Standalone View
web/chat/chat-message-list-container.react.js
Show First 20 Lines • Show All 223 Lines • ▼ Show 20 Lines | if (!isChatCreation) { | ||||
{messageListAndInput} | {messageListAndInput} | ||||
</> | </> | ||||
); | ); | ||||
} | } | ||||
const chatUserSelection = ( | const chatUserSelection = ( | ||||
<ChatThreadComposer | <ChatThreadComposer | ||||
userInfoInputArray={userInfoInputArray} | userInfoInputArray={userInfoInputArray} | ||||
setUserInfoInputArray={setUserInfoInputArray} | setUserInfoInputArray={setUserInfoInputArray} | ||||
existingThreadInfoFinderForCreatingThread={ | |||||
existingThreadInfoFinderForCreatingThread | |||||
} | |||||
otherUserInfos={otherUserInfos} | otherUserInfos={otherUserInfos} | ||||
threadID={threadInfo.id} | threadID={threadInfo.id} | ||||
inputState={inputState} | inputState={inputState} | ||||
/> | /> | ||||
); | ); | ||||
if (!userInfoInputArray.length) { | if (!userInfoInputArray.length) { | ||||
return chatUserSelection; | return chatUserSelection; | ||||
} | } | ||||
return ( | return ( | ||||
<> | <> | ||||
{topBar} | {topBar} | ||||
{chatUserSelection} | {chatUserSelection} | ||||
{messageListAndInput} | {messageListAndInput} | ||||
</> | </> | ||||
); | ); | ||||
}, [ | }, [ | ||||
existingThreadInfoFinderForCreatingThread, | |||||
inputState, | inputState, | ||||
isChatCreation, | isChatCreation, | ||||
otherUserInfos, | otherUserInfos, | ||||
threadInfo, | threadInfo, | ||||
userInfoInputArray, | userInfoInputArray, | ||||
]); | ]); | ||||
return connectDropTarget( | return connectDropTarget( | ||||
<div className={containerStyle} ref={containerRef}> | <div className={containerStyle} ref={containerRef}> | ||||
{content} | {content} | ||||
</div>, | </div>, | ||||
); | ); | ||||
} | } | ||||
export default ChatMessageListContainer; | export default ChatMessageListContainer; |