diff --git a/webapp/packages/core-blocks/src/CommonDialog/DialogsPortal.tsx b/webapp/packages/core-blocks/src/CommonDialog/DialogsPortal.tsx index 139fbee6d6..fc56e623f9 100644 --- a/webapp/packages/core-blocks/src/CommonDialog/DialogsPortal.tsx +++ b/webapp/packages/core-blocks/src/CommonDialog/DialogsPortal.tsx @@ -88,15 +88,7 @@ export const DialogsPortal = observer(function DialogsPortal() {
{commonDialogService.dialogs.map((dialog, i, arr) => ( - - - + ))}
@@ -112,6 +104,7 @@ interface NestedDialogType { } const NestedDialog: React.FC = function NestedDialog({ dialog, resolveDialog, rejectDialog, visible }) { + const styles = useS(style); const DialogComponent = dialog.component; const context = useMemo( @@ -125,13 +118,15 @@ const NestedDialog: React.FC = function NestedDialog({ dialog, return ( - + + + ); }; diff --git a/webapp/packages/core-blocks/src/ErrorBoundary.tsx b/webapp/packages/core-blocks/src/ErrorBoundary.tsx index cd6382d863..cafff18196 100644 --- a/webapp/packages/core-blocks/src/ErrorBoundary.tsx +++ b/webapp/packages/core-blocks/src/ErrorBoundary.tsx @@ -5,7 +5,7 @@ * Licensed under the Apache License, Version 2.0. * you may not use this file except in compliance with the License. */ -import React, { ErrorInfo } from 'react'; +import React, { ErrorInfo, Suspense } from 'react'; import { errorOf, LoadingError } from '@cloudbeaver/core-utils'; @@ -76,62 +76,72 @@ export class ErrorBoundary extends React.Component -

Something went wrong.

- {onClose && ( -
- -
- )} - {this.canRefresh && ( -
- -
- )} + Loading...}>
- {errorData.error.toString()} - {stack &&
} - {stack} +

Something went wrong.

+ {onClose && ( +
+ +
+ )} + {this.canRefresh && ( +
+ +
+ )} +
+ {errorData.error.toString()} + {stack &&
} + {stack} +
+ {this.props.fallback}
- {this.props.fallback} - +
); } if (root) { return ( - - {onClose && ( -
- -
- )} - {this.canRefresh && ( -
- -
- )} -
+ Loading...}> + + {onClose && ( +
+ +
+ )} + {this.canRefresh && ( +
+ +
+ )} +
+
); } else { return ( - + Loading...}> + + ); } } - return {children}; + return ( + + Loading...}>{children} + + ); } private refresh() {