This commit is contained in:
Sacha Weatherstone
2025-03-01 14:14:21 +08:00
parent 5a62b67e79
commit 977b5647f6
28 changed files with 368 additions and 366 deletions
@@ -34,7 +34,8 @@ export const ChannelChat = ({
const scrollToBottom = useCallback(() => {
const scrollContainer = scrollContainerRef.current;
if (scrollContainer) {
const isNearBottom = scrollContainer.scrollHeight -
const isNearBottom =
scrollContainer.scrollHeight -
scrollContainer.scrollTop -
scrollContainer.clientHeight <
100;
@@ -71,8 +72,9 @@ export const ChannelChat = ({
key={message.id}
message={message}
sender={nodes.get(message.from)}
lastMsgSameUser={index > 0 &&
messages[index - 1].from === message.from}
lastMsgSameUser={
index > 0 && messages[index - 1].from === message.from
}
/>
);
})}