diff --git a/src/components/GenerateRoadmap/GenerateRoadmap.tsx b/src/components/GenerateRoadmap/GenerateRoadmap.tsx index d5ad8d0a5..48e021ddb 100644 --- a/src/components/GenerateRoadmap/GenerateRoadmap.tsx +++ b/src/components/GenerateRoadmap/GenerateRoadmap.tsx @@ -89,10 +89,11 @@ type GetAIRoadmapResponse = { type GenerateRoadmapProps = { roadmapId?: string; + t?: string; }; export function GenerateRoadmap(props: GenerateRoadmapProps) { - const { roadmapId } = props; + const { roadmapId, t: term = '' } = props; const roadmapContainerRef = useRef(null); @@ -104,7 +105,7 @@ export function GenerateRoadmap(props: GenerateRoadmapProps) { const [hasSubmitted, setHasSubmitted] = useState(Boolean(roadmapId)); const [isLoading, setIsLoading] = useState(false); const [isLoadingResults, setIsLoadingResults] = useState(false); - const [roadmapTerm, setRoadmapTerm] = useState(''); + const [roadmapTerm, setRoadmapTerm] = useState(term); const [generatedRoadmapContent, setGeneratedRoadmapContent] = useState(''); const [currentRoadmap, setCurrentRoadmap] = useState(null); @@ -406,7 +407,7 @@ export function GenerateRoadmap(props: GenerateRoadmapProps) { limitUsed={roadmapLimitUsed} loadAIRoadmapLimit={loadAIRoadmapLimit} isKeyOnly={isKeyOnly} - onLoadTerm={(term: string) => { + onLoadTerm={(term) => { setRoadmapTerm(term); loadTermRoadmap(term).finally(() => {}); }}