Fix message history order
This commit is contained in:
parent
651bee32ca
commit
9d2cee8dbb
2 changed files with 2 additions and 2 deletions
|
@ -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]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -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;
|
||||||
|
|
Reference in a new issue