From e11e31bbd00d8902e3fec32fb0f9fb1592d5c959 Mon Sep 17 00:00:00 2001 From: Ryan Fischbach Date: Thu, 16 May 2024 15:04:22 -0700 Subject: [PATCH 1/2] React import missing and typo fix. --- src/index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/index.js b/src/index.js index 460cd3e5..77145880 100644 --- a/src/index.js +++ b/src/index.js @@ -2,7 +2,7 @@ import './global.module.scss'; import 'static/fonts/floweditor/style.css'; import FlowEditor from 'components'; -import React from 'react'; +import React, {useRef} from 'react'; import ReactDOM from 'react-dom'; import * as serviceWorker from './serviceWorker'; @@ -28,7 +28,7 @@ window.showFlowEditor = (ele, config) => { concatSCHEMES(config.schemes); } //<*((==< return the instance reference - const theFlowEditor = userRef(null); + const theFlowEditor = useRef(null); ReactDOM.render(, ele); return theFlowEditor; }; From c7e7a318ce474fd4d1862cbc20ec5a5364806d03 Mon Sep 17 00:00:00 2001 From: Ryan Fischbach Date: Thu, 16 May 2024 15:05:01 -0700 Subject: [PATCH 2/2] code reformatted itself. --- src/index.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/index.js b/src/index.js index 77145880..ae5f34ca 100644 --- a/src/index.js +++ b/src/index.js @@ -2,7 +2,7 @@ import './global.module.scss'; import 'static/fonts/floweditor/style.css'; import FlowEditor from 'components'; -import React, {useRef} from 'react'; +import React, { useRef } from 'react'; import ReactDOM from 'react-dom'; import * as serviceWorker from './serviceWorker'; @@ -28,8 +28,8 @@ window.showFlowEditor = (ele, config) => { concatSCHEMES(config.schemes); } //<*((==< return the instance reference - const theFlowEditor = useRef(null); - ReactDOM.render(, ele); + const theFlowEditor = useRef(null); + ReactDOM.render(, ele); return theFlowEditor; };