import { ChevronDown, ChevronUp, CircleHelp, GraduationCap, Info, } from 'lucide-react'; import { useRef, useState } from 'react'; import { useOutsideClick } from '../hooks/use-outside-click'; import { markdownToHtml } from '../lib/markdown'; type RoadmapTitleQuestionProps = { question: string; answer: string; }; export function RoadmapTitleQuestion(props: RoadmapTitleQuestionProps) { const { question, answer } = props; const [isAnswerVisible, setIsAnswerVisible] = useState(false); const ref = useRef(null); useOutsideClick(ref, () => { setIsAnswerVisible(false); }); return (
{isAnswerVisible && (
)}

{ e.preventDefault(); setIsAnswerVisible(!isAnswerVisible); }} > {question}

{isAnswerVisible && (

setIsAnswerVisible(false)} > {question}

)}
); }