Fix long names of topic ai

This commit is contained in:
Kamran Ahmed
2025-07-07 15:52:41 +01:00
parent 7e4cce86a6
commit 882b01a165
+3 -8
View File
@@ -290,21 +290,16 @@ export function TopicDetailAI(props: TopicDetailAIProps) {
<a <a
target="_blank" target="_blank"
href={`/ai/course?term=${roadmapTreeMapping?.text}&difficulty=beginner&src=topic`} href={`/ai/course?term=${roadmapTreeMapping?.text}&difficulty=beginner&src=topic`}
className="flex items-center gap-1 rounded-md border border-gray-300 bg-gray-100 px-2 py-1 hover:bg-gray-200 hover:text-black" className="flex items-center gap-1 rounded-md border border-gray-300 bg-gray-100 px-2 py-1 hover:bg-gray-200 hover:text-black [&>svg:last-child]:hidden"
> >
{nodeTextParts.slice(1).map((text, index) => { {nodeTextParts.slice(-2).map((text, index) => {
// -2 because we are removing roadmap title from the list
const isLast = index === nodeTextParts.length - 2;
return ( return (
<> <>
<span key={text} className="flex items-center"> <span key={text} className="flex items-center">
{text} {text}
</span> </span>
{!isLast && ( <ChevronRightIcon className="h-3 w-3 text-gray-400" />
<ChevronRightIcon className="h-3 w-3 text-gray-400" />
)}
</> </>
); );
})} })}