Skip to content

Commit

Permalink
✨ Fix old agents
Browse files Browse the repository at this point in the history
  • Loading branch information
asim-shrestha committed Jul 6, 2023
1 parent c1c1984 commit 434624e
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion next/src/pages/agent/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ import { languages } from "../../utils/languages";
import { serverSideTranslations } from "next-i18next/serverSideTranslations";
import nextI18NextConfig from "../../../next-i18next.config";
import DashboardLayout from "../../layout/dashboard";
import FadeIn from "../../components/motions/FadeIn";
import { ChatMessage } from "../../components/console/ChatMessage";

const AgentPage: NextPage = () => {
const [t] = useTranslation();
Expand Down Expand Up @@ -44,7 +46,15 @@ const AgentPage: NextPage = () => {
id="content"
className="flex h-screen max-w-full flex-col items-center justify-center gap-3 px-3 pt-7 md:px-10"
>
<ChatWindow messages={messages} title={getAgent?.data?.name} visibleOnMobile />
<ChatWindow messages={messages} title={getAgent?.data?.name} visibleOnMobile>
{messages.map((message, index) => {
return (
<FadeIn key={`${index}-${message.type}`}>
<ChatMessage message={message} />
</FadeIn>
);
})}
</ChatWindow>
<div className="flex flex-row gap-2">
<Button icon={<FaBackspace />} loader onClick={() => void router.push("/")}>
Back
Expand Down

0 comments on commit 434624e

Please sign in to comment.