mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-11-24 06:35:49 +03:00
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.
This commit is contained in:
parent
723b35bfa6
commit
28921a8dbf
@ -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 (
|
||||
<iframe data-frame="admin-auth" src={adminUrl + 'auth-frame/'} style={iframeStyle} title="auth-frame"></iframe>
|
||||
<iframe data-frame="admin-auth" src={adminUrl + 'auth-frame/'} style={iframeStyle} title="auth-frame" onLoad={onLoad}></iframe>
|
||||
);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user