diff --git a/web/src/modules/topic/components/TopicPane/TopicPane.tsx b/web/src/modules/topic/components/TopicPane/TopicPane.tsx index 0119a1b2..f3c21498 100644 --- a/web/src/modules/topic/components/TopicPane/TopicPane.tsx +++ b/web/src/modules/topic/components/TopicPane/TopicPane.tsx @@ -16,7 +16,7 @@ import { viewClaimDiagram, viewCriteriaTable, viewProblemDiagram } from "../../s import { useNodes } from "../../store/nodeHooks"; import { problemDiagramId, - useClaimDiagramIdentifiers, + useClaimDiagramsWithExplicitClaims, useRootTitle, useTopicViewId, } from "../../store/store"; @@ -36,7 +36,7 @@ export const TopicPane = () => { const topicViewId = useTopicViewId(); const rootTitle = useRootTitle(); - const claimDiagramIdentifiers = useClaimDiagramIdentifiers(); + const claimDiagramIdentifiers = useClaimDiagramsWithExplicitClaims(); const problems = useNodes(problemDiagramId, (node) => node.type === "problem"); const handleDrawerToggle = () => { diff --git a/web/src/modules/topic/store/store.ts b/web/src/modules/topic/store/store.ts index 610981dd..ee7d42bc 100644 --- a/web/src/modules/topic/store/store.ts +++ b/web/src/modules/topic/store/store.ts @@ -112,10 +112,10 @@ export const useActiveTableProblemId = () => { return useTopicStoreAfterHydration((state) => state.activeTableProblemId); }; -export const useClaimDiagramIdentifiers = () => { +export const useClaimDiagramsWithExplicitClaims = () => { return useTopicStoreAfterHydration((state) => Object.entries(state.diagrams) - .filter(([id, _]) => id !== problemDiagramId) + .filter(([id, diagram]) => id !== problemDiagramId && diagram.nodes.length > 1) .map(([id, diagram]) => [id, diagram.nodes[0].data.label]) ); };