From 15cd66d0bf8b36c96307fc67448f8f64f52c3cd6 Mon Sep 17 00:00:00 2001 From: "dayuan.jiang" Date: Wed, 26 Mar 2025 06:47:44 +0000 Subject: [PATCH] minor: update refs in diagram context to use React.Ref type --- contexts/diagram-context.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/contexts/diagram-context.tsx b/contexts/diagram-context.tsx index adce5fa..7c6de65 100644 --- a/contexts/diagram-context.tsx +++ b/contexts/diagram-context.tsx @@ -10,8 +10,8 @@ interface DiagramContextType { diagramHistory: { svg: string; xml: string }[]; loadDiagram: (chart: string) => void; handleExport: () => void; - resolverRef: React.MutableRefObject<((value: string) => void) | null>; - drawioRef: React.MutableRefObject; + resolverRef: React.Ref<((value: string) => void) | null>; + drawioRef: React.Ref; handleDiagramExport: (data: any) => void; } @@ -23,7 +23,7 @@ export function DiagramProvider({ children }: { children: React.ReactNode }) { const [diagramHistory, setDiagramHistory] = useState< { svg: string; xml: string }[] >([]); - const drawioRef = useRef(null); + const drawioRef = useRef(null); const resolverRef = useRef<((value: string) => void) | null>(null); const handleExport = () => {