From 28921a8dbfff4e4b5538e05cadbfe45278b1a6b4 Mon Sep 17 00:00:00 2001 From: Simon Backx Date: Wed, 20 Jul 2022 16:30:28 +0200 Subject: [PATCH] Fixed randomly not loading comments area refs https://github.com/TryGhost/Team/issues/1696 - Wait for the iframe to load before sending messages to it - High chance this fixes the issue, but still need to monitor if this was the real cause. --- apps/comments-ui/src/App.js | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/apps/comments-ui/src/App.js b/apps/comments-ui/src/App.js index 144739edce..5d0e76423e 100644 --- a/apps/comments-ui/src/App.js +++ b/apps/comments-ui/src/App.js @@ -7,22 +7,15 @@ import AppContext from './AppContext'; import {hasMode} from './utils/check-mode'; import setupGhostApi from './utils/api'; import CommentsBox from './components/CommentsBox'; -import {useEffect} from 'react'; import Loading from './components/Loading'; -function AuthFrame({adminUrl, onLoad, initStatus}) { - useEffect(function () { - if (initStatus !== 'success') { - onLoad(); - } - }, [onLoad, initStatus]); - +function AuthFrame({adminUrl, onLoad}) { const iframeStyle = { display: 'none' }; return ( - + ); }