diff --git a/apps/web/src/components/mermaid-diagram.tsx b/apps/web/src/components/mermaid-diagram.tsx index 55fdc58..fa8a549 100644 --- a/apps/web/src/components/mermaid-diagram.tsx +++ b/apps/web/src/components/mermaid-diagram.tsx @@ -9,7 +9,6 @@ interface MermaidDiagramProps { } export function MermaidDiagram({ chart }: MermaidDiagramProps) { - const containerRef = useRef(null); const [error, setError] = useState(null); const [isReady, setIsReady] = useState(false); const [svgHtml, setSvgHtml] = useState(""); @@ -184,22 +183,29 @@ export function MermaidDiagram({ chart }: MermaidDiagramProps) { onMouseLeave={handleMouseUp} style={fullHeight ? { height: "100%" } : { minHeight: "100px" }} > -
- {!svgHtml && !isReady && ( -
-
-
- )} -
+ {svgHtml ? ( +
+ ) : ( +
+ {!isReady && ( +
+
+
+ )} +
+ )}
);