(null);
+
+ useEffect(() => {
+ if (excalidrawAPI !== null) {
+ fetch(diagramPath)
+ .then((res) => res.blob())
+ .then((blob) =>
+ loadFromBlob(blob, excalidrawAPI.getAppState(), null)
+ )
+ .then((data) => {
+ excalidrawAPI.updateScene(data);
+ });
+ }
+ }, [excalidrawAPI]);
+
+ return (
+
+ setExcalidrawAPI(api)}
+ isCollaborating={false}
+ zenModeEnabled={false}
+ viewModeEnabled={true}
+ gridModeEnabled={false}
+ UIOptions={{
+ canvasActions: {
+ export: false,
+ loadScene: false,
+ saveToActiveFile: false,
+ },
+ }}
+ />
+
+ );
+ }
+
+ return ;
+ }}
+