feat: loading state for messages

This commit is contained in:
Daniel Avila 2023-03-11 18:39:46 -05:00
parent afae13eec6
commit 79f050bac7
6 changed files with 43 additions and 8 deletions

View file

@ -4,6 +4,7 @@ import { useSelector } from 'react-redux';
import GPTIcon from '../svg/GPTIcon';
import BingIcon from '../svg/BingIcon';
import HoverButtons from './HoverButtons';
import Spinner from '../svg/Spinner';
export default function Message({
sender,
@ -22,6 +23,10 @@ export default function Message({
scrollToBottom();
}
}, [isSubmitting, text, blinker, scrollToBottom, abortScroll]);
if (sender === '') {
return <Spinner />;
}
const handleWheel = () => {
if (blinker) {