import * as React from 'react';
import { ReloadOutlined } from '@ant-design/icons';
import { Spin, Alert, Button } from 'antd';
import { sample } from 'lodash';
import { PromiseResult, PromiseResultStatus } from '../hooks/usePromiseResult';
interface RenderResolvedPromiseOptions {
// A custom function that will render a specific "resolving" state, rather than the default loading UI.
renderResolving?: () => React.ReactElement | null;
// A custom function that will render a specific "rejected" state, rather than the default rejection UI.
renderRejected?: (error: Error, retry: () => void) => React.ReactElement;
showStackTrace?: boolean;
}
const loadingLines = [
'Upsorbing the Contents',
'Additive Parsing the Load',
'Commence Monosaturated Goodening',
'Kick Off the Multi-Core Widening',
'Bastening the Game Turkey',
'Abstracting the Rummage Disc',
'Undecerealenizing the Process',
'Postrefragmenting the Widget Layer',
'Satisfying the Constraints',
'Abnoramalzing Some of the Matrices',
'Optimizing the People',
'Proclaigerizing the Network',
];
function Resolving() {
const loadingLine = React.useMemo(() => sample(loadingLines), []);
return (
{error.stack
.split('\n')
.slice(1)
.map((l) => l.trim())
.join('\n')}
) : null;
const description = (
<>
{stackTrace}
} size="middle" onClick={retry}>
Retry
>
);
return