mirror of
https://github.com/arc53/DocsGPT.git
synced 2025-12-03 02:23:14 +00:00
@@ -19,8 +19,9 @@ export default function Conversation() {
|
||||
const endMessageRef = useRef<HTMLDivElement>(null);
|
||||
const inputRef = useRef<HTMLDivElement>(null);
|
||||
|
||||
useEffect(() =>
|
||||
endMessageRef?.current?.scrollIntoView({ behavior: 'smooth' }),
|
||||
useEffect(
|
||||
() => endMessageRef?.current?.scrollIntoView({ behavior: 'smooth' }),
|
||||
[messages],
|
||||
);
|
||||
|
||||
const handleQuestion = (question: string) => {
|
||||
@@ -35,7 +36,7 @@ export default function Conversation() {
|
||||
return (
|
||||
<ConversationBubble
|
||||
ref={index === messages.length - 1 ? endMessageRef : null}
|
||||
className={`${index === messages.length - 1 ? 'mb-20' : 'mb-7'}`}
|
||||
className={`${index === messages.length - 1 ? 'mb-24' : 'mb-7'}`}
|
||||
key={index}
|
||||
message={message.text}
|
||||
type={message.type}
|
||||
|
||||
Reference in New Issue
Block a user