Refactor UI

feat/chat
Kamran Ahmed 1 month ago
parent 6ad7dfe5b7
commit 6d1335d02c
  1. 6
      src/components/GenerateCourse/AICourseLesson.tsx
  2. 2
      src/components/GenerateCourse/AICourseLessonChat.tsx

@ -109,7 +109,7 @@ export function AICourseLesson(props: AICourseLessonProps) {
{ {
role: 'assistant', role: 'assistant',
content: content:
'Hey, I am your AI instructor. Here are some examples of what you can ask me about 🤖', 'Hey, I am your AI instructor. How can I help you today? 🤖',
isDefault: true, isDefault: true,
}, },
]); ]);
@ -268,7 +268,7 @@ export function AICourseLesson(props: AICourseLessonProps) {
<div className="h-full"> <div className="h-full">
<ResizablePanelGroup direction="horizontal"> <ResizablePanelGroup direction="horizontal">
<ResizablePanel <ResizablePanel
defaultSize={isAIChatsOpen ? 60 : 100} defaultSize={isAIChatsOpen ? 70 : 100}
minSize={40} minSize={40}
id="course-text-content" id="course-text-content"
className="h-full !overflow-y-scroll bg-white" className="h-full !overflow-y-scroll bg-white"
@ -292,7 +292,7 @@ export function AICourseLesson(props: AICourseLessonProps) {
</div> </div>
{!isGenerating && !isLoading && ( {!isGenerating && !isLoading && (
<div className="absolute right-6 top-6 flex items-center justify-between gap-2"> <div className="absolute top-2 right-2 lg:right-6 lg:top-6 flex items-center justify-between gap-2">
<button <button
onClick={() => setIsAIChatsOpen(!isAIChatsOpen)} onClick={() => setIsAIChatsOpen(!isAIChatsOpen)}
className="rounded-full p-1 text-gray-400 hover:text-black max-lg:hidden" className="rounded-full p-1 text-gray-400 hover:text-black max-lg:hidden"

@ -211,7 +211,7 @@ export function AICourseLessonChat(props: AICourseLessonChatProps) {
return ( return (
<ResizablePanel <ResizablePanel
defaultSize={isAIChatsOpen ? 40 : 0} defaultSize={isAIChatsOpen ? 30 : 0}
minSize={20} minSize={20}
id="course-chat-content" id="course-chat-content"
order={2} order={2}

Loading…
Cancel
Save