Skip to content

Commit

Permalink
comment just in case and address feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
alextaing committed Oct 24, 2023
1 parent 870ca02 commit bca2e74
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion packages/studio-ui/src/AppWithLazyLoading.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export default function AppWithLazyLoading() {

return (
<LoadingOverlay
loading={!(componentsLoaded && stylesLoaded && appLoaded)}
loading={!(componentsLoaded && resourcesLoaded )}
overlay={
<>
{renderComponentLoadingProgress(
Expand Down
7 changes: 7 additions & 0 deletions packages/studio-ui/src/hooks/useInjectUserStyles.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,13 @@ export default function useInjectUserStyles(
return () => {
clearStylingFromIframe(iframeDocument);
};

/**
* loadedStyles is watched by this useEffect hook to
* account for the race condition where this hook is
* called before all user styles are added to Studio's
* document head.
*/
}, [iframeDocument, userStyleImports, loadedStyles]);
}

Expand Down

0 comments on commit bca2e74

Please sign in to comment.