Offeri frame flash fix (#19565)

This commit is contained in:
Princi Vershwal 2024-01-24 17:02:55 +05:30 committed by GitHub
parent e4f60ee028
commit 0627840f13
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -18,6 +18,7 @@ const PortalFrame: React.FC<PortalFrameProps> = ({href, onDestroyed, selectedTab
const makeVisible = useCallback(() => {
setTimeout(() => {
if (iframeRef.current) {
setHasLoaded(true);
setIsInvisible(false);
}
}, 300);
@ -60,7 +61,6 @@ const PortalFrame: React.FC<PortalFrameProps> = ({href, onDestroyed, selectedTab
title="Portal Preview"
width="100%"
onLoad={() => {
setHasLoaded(true);
}}
/>
</>