mirror of
https://github.com/kamranahmedse/developer-roadmap.git
synced 2025-09-02 22:02:39 +02:00
If topic has no contentn redirect to ai tutor
This commit is contained in:
@@ -316,12 +316,17 @@ export function TopicDetail(props: TopicDetailProps) {
|
||||
}
|
||||
|
||||
topicHtml = topicDom.body.innerHTML;
|
||||
const topicHasContent = otherElems.length > 0;
|
||||
|
||||
setLinks(listLinks);
|
||||
setHasContent(otherElems.length > 0);
|
||||
setHasContent(topicHasContent);
|
||||
setContributionUrl(contributionUrl);
|
||||
setHasEnoughLinks(links.length >= 3);
|
||||
setTopicHtmlTitle(titleElem?.textContent || '');
|
||||
|
||||
if (!topicHasContent && renderer === 'editor') {
|
||||
setActiveTab('ai');
|
||||
}
|
||||
} else {
|
||||
setLinks((response as RoadmapContentDocument)?.links || []);
|
||||
setTopicTitle((response as RoadmapContentDocument)?.title || '');
|
||||
|
Reference in New Issue
Block a user