From 40a37e5e01f0d7e58f70e04f3b410e2a62aa1bd8 Mon Sep 17 00:00:00 2001 From: Brandon Perry Date: Tue, 14 Oct 2025 11:56:14 -0700 Subject: [PATCH] T3C-246 addeed summaries to topic ui --- next-client/src/components/topic/Topic.tsx | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) 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() { /> )} - + ); }