test: update the test cases

This commit is contained in:
GeoffreyLiu
2022-11-11 10:44:59 +08:00
parent 3170f875e5
commit 1993734a99
3 changed files with 54 additions and 11 deletions
@@ -0,0 +1,12 @@
import { useEffect, useRef } from 'react';
import ReactFlow from 'reactflow';
export function RefReactFlow({ onGetRef }: { onGetRef: (element: HTMLDivElement | null) => void }) {
const ref = useRef<HTMLDivElement | null>(null);
useEffect(() => {
onGetRef(ref.current);
}, []);
return <ReactFlow ref={ref} />;
}