From 54344c218e36b6be65bf12305dc4f53ea5a5d6cc Mon Sep 17 00:00:00 2001 From: Simon Backx Date: Fri, 8 Jul 2022 12:55:02 +0200 Subject: [PATCH] Fixed useEffect warnings --- apps/comments-ui/src/App.js | 2 +- apps/comments-ui/src/components/Form.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/comments-ui/src/App.js b/apps/comments-ui/src/App.js index d8a810c549..5572a1ebae 100644 --- a/apps/comments-ui/src/App.js +++ b/apps/comments-ui/src/App.js @@ -12,7 +12,7 @@ import {useEffect} from 'react'; function AuthFrame({adminUrl, onLoad}) { useEffect(function () { onLoad(); - }, []); + }, [onLoad]); const iframeStyle = { display: 'none' diff --git a/apps/comments-ui/src/components/Form.js b/apps/comments-ui/src/components/Form.js index c906c33007..db7943f250 100644 --- a/apps/comments-ui/src/components/Form.js +++ b/apps/comments-ui/src/components/Form.js @@ -52,7 +52,7 @@ const Form = (props) => { }); }) .run(); - }, [editor]); + }, [editor, props.isEdit]); const focused = editor?.isFocused || !editor?.isEmpty;