mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-10-18 21:16:47 +00:00
fix(collab): let the empty chat state fill the panel
The empty state went in without flex-1 while the message list it stands in for has it, so it was only as tall as its own content. The composer rode up to sit directly under the mascot with the rest of the panel left blank, which reads as a layout that failed rather than a chat waiting for its first message.
This commit is contained in:
@@ -13,7 +13,10 @@ export function ChatMessages(props: any) {
|
||||
<>
|
||||
{/* Messages */}
|
||||
{messages.length === 0 ? (
|
||||
<EmptyState scene="chat" title={t('collab.chat.empty')} />
|
||||
// flex-1, like the message list it stands in for: without it the empty
|
||||
// state was only as tall as its own content and the composer rode up to
|
||||
// sit right under the mascot, with the rest of the panel left blank.
|
||||
<EmptyState scene="chat" title={t('collab.chat.empty')} className="min-h-0 flex-1" />
|
||||
) : (
|
||||
<div ref={scrollRef} onScroll={checkAtBottom} className="chat-scroll" style={{
|
||||
flex: 1, overflowY: 'auto', overflowX: 'hidden', padding: '8px 14px 4px', WebkitOverflowScrolling: 'touch',
|
||||
|
||||
Reference in New Issue
Block a user