If topic has no contentn redirect to ai tutor
This commit is contained in:
1 parent
9bbf8ea04b
commit
a1c564534a
1 file changed
+6
-1
@@ -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