mirror of
https://github.com/aljazceru/AgentGPT.git
synced 2025-12-18 06:24:20 +01:00
🎨 Add animations
This commit is contained in:
@@ -2,6 +2,7 @@ import cx from "classnames";
|
||||
import type { ReactNode } from "react";
|
||||
import React, { useEffect, useRef } from "react";
|
||||
import { FaBrain, FaListAlt, FaPlayCircle, FaStar } from "react-icons/fa";
|
||||
import autoAnimate from "@formkit/auto-animate";
|
||||
|
||||
interface ChatWindowProps {
|
||||
children?: ReactNode;
|
||||
@@ -19,6 +20,10 @@ const ChatWindow = ({ messages, children, className }: ChatWindowProps) => {
|
||||
}
|
||||
});
|
||||
|
||||
useEffect(() => {
|
||||
scrollRef.current && autoAnimate(scrollRef.current);
|
||||
}, [messages]);
|
||||
|
||||
return (
|
||||
<div
|
||||
className={
|
||||
|
||||
Reference in New Issue
Block a user