setShowSubjectSearchModal(false)} />
+ )}
+
{isLoading && (
{
+ if (!isLoggedIn()) {
+ showLoginPopup();
+ return;
+ }
+
+ setShowSubjectSearchModal(true);
+ }}
/>
)}
diff --git a/src/components/TopicDetail/TopicDetailAI.tsx b/src/components/TopicDetail/TopicDetailAI.tsx
index 21310cb1d..8b4511337 100644
--- a/src/components/TopicDetail/TopicDetailAI.tsx
+++ b/src/components/TopicDetail/TopicDetailAI.tsx
@@ -10,9 +10,8 @@ import {
ChevronRightIcon,
Gift,
Loader2Icon,
- LockIcon,
- SendIcon,
- Trash2,
+ LockIcon, SendIcon, Trash2,
+ WandSparkles
} from 'lucide-react';
import { showLoginPopup } from '../../lib/popup';
import { cn } from '../../lib/classname';
@@ -42,6 +41,8 @@ type TopicDetailAIProps = {
onUpgrade: () => void;
onLogin: () => void;
+
+ onShowSubjectSearchModal: () => void;
};
export function TopicDetailAI(props: TopicDetailAIProps) {
@@ -53,6 +54,7 @@ export function TopicDetailAI(props: TopicDetailAIProps) {
topicId,
onUpgrade,
onLogin,
+ onShowSubjectSearchModal,
} = props;
const textareaRef = useRef(null);
@@ -298,6 +300,14 @@ export function TopicDetailAI(props: TopicDetailAIProps) {
))}
)}
+
+
)}