diff --git a/src/components/GenerateRoadmap/RoadmapTopicDetail.tsx b/src/components/GenerateRoadmap/RoadmapTopicDetail.tsx index 66fc1461e..6c97389db 100644 --- a/src/components/GenerateRoadmap/RoadmapTopicDetail.tsx +++ b/src/components/GenerateRoadmap/RoadmapTopicDetail.tsx @@ -3,7 +3,7 @@ import { useEffect, useMemo, useRef, useState } from 'react'; import { useKeydown } from '../../hooks/use-keydown'; import { useOutsideClick } from '../../hooks/use-outside-click'; import { markdownToHtml } from '../../lib/markdown'; -import { Ban, Cog, FileText, X } from 'lucide-react'; +import {Ban, Cog, Contact, FileText, User, UserRound, X} from 'lucide-react'; import { Spinner } from '../ReactIcons/Spinner'; import type { RoadmapNodeDetails } from './GenerateRoadmap'; import { getOpenAIKey, isLoggedIn, removeAuthToken } from '../../lib/jwt'; @@ -43,12 +43,10 @@ export function RoadmapTopicDetail(props: RoadmapTopicDetailProps) { const generateAiRoadmapTopicContent = async () => { setIsLoading(true); setError(''); - // - // if (topicLimitUsed >= topicLimit) { - // setError('Maximum limit reached'); - // setIsLoading(false); - // return; - // } + + if (!isLoggedIn()) { + return; + } if (!roadmapId || !nodeTitle) { setIsLoading(false); @@ -133,50 +131,44 @@ export function RoadmapTopicDetail(props: RoadmapTopicDetailProps) { tabIndex={0} className="fixed right-0 top-0 z-40 h-screen w-full overflow-y-auto bg-white p-4 focus:outline-0 sm:max-w-[600px] sm:p-6" > -
+ Sign up or login to generate topic content. +
+ +