Reworked mobile UI for some components

This commit is contained in:
t1enne
2022-07-08 22:20:22 +02:00
parent 37ad329072
commit efbe6907ac
15 changed files with 223 additions and 132 deletions

View File

@@ -65,9 +65,9 @@ export default function ChatContainer(props: Props) {
const MessagesTable = useMemo(
() => (
<>
<div style={{ height: '100%' }}>
<Virtuoso
style={{ height: isMobile ? 500 : '77vh', width: 'auto' }}
style={{ height: '100%', width: 'auto' }}
ref={chatContainerRef}
initialTopMostItemIndex={messages.length - 1} // Force alignment to bottom
data={messages}
@@ -92,7 +92,7 @@ export default function ChatContainer(props: Props) {
</Button>
</div>
)}
</>
</div>
),
[messages, usernameToHighlight, chatUserId, isModerator, atBottom, isMobile],
);