chore: react-dom createPortal import

This commit is contained in:
Daniel Lautzenheiser 2023-02-27 10:58:34 -05:00
parent eda8129912
commit 6dbbcf77f0

View File

@ -1,6 +1,6 @@
import { styled } from '@mui/material/styles'; import { styled } from '@mui/material/styles';
import React, { useCallback, useMemo } from 'react'; import React, { useCallback, useMemo } from 'react';
import ReactDOM from 'react-dom'; import { createPortal } from 'react-dom';
import Frame from 'react-frame-component'; import Frame from 'react-frame-component';
import { translate } from 'react-polyglot'; import { translate } from 'react-polyglot';
import { connect } from 'react-redux'; import { connect } from 'react-redux';
@ -132,7 +132,7 @@ const PreviewPane = (props: TranslatedProps<EditorPreviewPaneProps>) => {
return null; return null;
} }
return ReactDOM.createPortal( return createPortal(
<StyledPreviewContent className="preview-content"> <StyledPreviewContent className="preview-content">
{!entry || !entry.data ? null : ( {!entry || !entry.data ? null : (
<ErrorBoundary config={config}> <ErrorBoundary config={config}>