diff --git a/next-client/src/components/topic/Topic.tsx b/next-client/src/components/topic/Topic.tsx index dc19fbf5..7a03eb2b 100644 --- a/next-client/src/components/topic/Topic.tsx +++ b/next-client/src/components/topic/Topic.tsx @@ -58,7 +58,6 @@ const TopicCard = forwardRef(function TopicCard( ) { const { topicNode } = useContext(TopicContext); const { title, description, summary } = topicNode.data; - return ( @@ -77,6 +76,7 @@ const TopicCard = forwardRef(function TopicCard( + {summary && topicNode.isOpen && } ); @@ -120,6 +120,15 @@ export function TopicContextDescription({ ); } +export function TopicSummary({ summary }: { summary: string }) { + return ( + +
Summary
+

{summary}

+ + ); +} + /** * Both the claim-cells and the subtopic list. Together here since they interact with one another. * ! Can probably be refactored to be simpler. @@ -266,7 +275,7 @@ function ExpandTopic() { const { isOpen, pagination, children: subtopicNodes, data } = topicNode; return ( - <> + {isOpen && data.context ? ( ) : ( @@ -290,7 +299,7 @@ function ExpandTopic() { /> )} - + ); }