fix: key warning

feat/chat
Arik Chakma 3 weeks ago
parent 27a08dba0f
commit ebfdaf3586
  1. 6
      src/components/GenerateCourse/AICourseLessonChat.tsx

@ -9,6 +9,7 @@ import {
XIcon,
} from 'lucide-react';
import {
Fragment,
useCallback,
useEffect,
useMemo,
@ -241,9 +242,8 @@ export function AICourseLessonChat(props: AICourseLessonChatProps) {
<div className="flex flex-col justify-end gap-2 px-3 py-2">
{courseAIChatHistory.map((chat, index) => {
return (
<>
<Fragment key={`chat-${index}`}>
<AIChatCard
key={`chat-${index}`}
role={chat.role}
content={chat.content}
html={chat.html}
@ -261,7 +261,7 @@ export function AICourseLessonChat(props: AICourseLessonChatProps) {
</div>
</div>
)}
</>
</Fragment>
);
})}

Loading…
Cancel
Save