1
Fork 0

Fix message history order

This commit is contained in:
Tobias Berger 2022-01-08 17:56:00 +01:00
parent b52cfeb93e
commit e1fec86c4b
Signed by: toby
GPG key ID: 2D05EFAB764D6A88
2 changed files with 2 additions and 2 deletions

View file

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

View file

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