1
Fork 0

Fix message history order

This commit is contained in:
Tobias Berger 2022-01-08 17:56:00 +01:00
parent 651bee32ca
commit 9d2cee8dbb
2 changed files with 2 additions and 2 deletions

View file

@ -29,7 +29,7 @@ export default function Index(): JSX.Element {
if (isIdResponseMessage(message)) { if (isIdResponseMessage(message)) {
setAuthorId(message.authorId); setAuthorId(message.authorId);
} else if (isTextMessage(message)) { } else if (isTextMessage(message)) {
setMessageHistory([message, ...messageHistory]); setMessageHistory([...messageHistory, message]);
} }
} }

View file

@ -46,7 +46,7 @@ main {
#messages-container { #messages-container {
display: flex; display: flex;
flex-direction: column-reverse; flex-direction: column;
overflow-y: scroll; overflow-y: scroll;
> :nth-child(even) { > :nth-child(even) {
background-color: lightgray; background-color: lightgray;