animates scroll to bottom and debounces bottom

This commit is contained in:
Daniel Avila 2023-02-13 20:13:59 -05:00
parent 779f142058
commit a5afd5c48f
9 changed files with 130 additions and 31 deletions

View file

@ -29,7 +29,7 @@ export default function TextChat({ messages }) {
}
dispatch(setSubmitState(true));
const payload = text.trim();
const currentMsg = { sender: 'user', text: payload, current: true };
const currentMsg = { sender: 'User', text: payload, current: true };
const initialResponse = { sender: 'GPT', text: '' };
dispatch(setMessages([...messages, currentMsg, initialResponse]));
dispatch(setText(''));