From 8f2f72a857083122bce14277089ebccd64312061 Mon Sep 17 00:00:00 2001
From: NtskwK <natsukawa247@outlook.com>
Date: Thu, 26 Mar 2026 10:00:35 +0800
Subject: fix(mermaid): update chart dependency in effect

---
 packages/docs/app/components/mermaid.tsx | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

(limited to 'packages/docs/app/components/mermaid.tsx')

diff --git a/packages/docs/app/components/mermaid.tsx b/packages/docs/app/components/mermaid.tsx
index 85ab342..d408aad 100644
--- a/packages/docs/app/components/mermaid.tsx
+++ b/packages/docs/app/components/mermaid.tsx
@@ -13,11 +13,12 @@ export function Mermaid({ chart }: { chart: string }) {
 
   useEffect(() => {
     if (ref.current) {
+      ref.current.innerHTML = chart;
       mermaid.run({
         nodes: [ref.current],
       });
     }
-  }, []);
+  }, [chart]);
 
   return (
     <div className="not-prose my-6">
-- 
cgit v1.2.3-70-g09d2

