fix(ui): simplify modal loading ui state

This commit is contained in:
Gabe Kangas 2023-07-04 12:11:27 -07:00
parent 4db77f5811
commit 5876c7cfbb
No known key found for this signature in database
GPG key ID: 4345B2060657F330

View file

@ -1,4 +1,4 @@
import { Spin, Skeleton, Modal as AntModal } from 'antd';
import { Spin, Modal as AntModal } from 'antd';
import React, { FC, ReactNode, useState } from 'react';
import { ErrorBoundary } from 'react-error-boundary';
import { ComponentError } from '../ComponentError/ComponentError';
@ -85,13 +85,11 @@ export const Modal: FC<ModalProps> = ({
)}
>
<div id="modal-container" style={{ height: '100%' }}>
{loading && (
<Skeleton active={loading} style={{ padding: '10px' }} paragraph={{ rows: 10 }} />
)}
{iframe && <div style={{ display: iframeDisplayStyle }}>{iframe}</div>}
{children && <div className={styles.content}>{children}</div>}
{loading && <Spin className={styles.spinner} spinning={loading} size="large" />}
{loading && (
<Spin className={styles.spinner} spinning={loading} size="large" tip={title} />
)}
</div>
</ErrorBoundary>
</AntModal>