Partial usage in the topics

This commit is contained in:
Kamran Ahmed committed 2023-11-09 21:36:58 +00:00
1 parent 80ec1a1c4b
commit 8fb3e7983b
2 files changed
+4 -39

No files matched your search

+1 -7
View File
@@ -158,13 +158,7 @@ export function TopicDetail(props: TopicDetailProps) {
}
let topicHtml = '';
if (!isCustomResource) {
// It's full HTML with page body, head etc.
// We only need the inner HTML of the #main-content
const node = new DOMParser().parseFromString(
response as string,
'text/html',
);
topicHtml = node?.getElementById('main-content')?.outerHTML || '';
topicHtml = response as string;
} else {
setLinks((response as RoadmapContentDocument)?.links || []);
setTopicTitle((response as RoadmapContentDocument)?.title || '');