UNPKG

1.01 kBJavaScriptView Raw
1import "antd/es/layout/style";
2import _Layout from "antd/es/layout";
3import { ConfigProviderWrap } from '@ant-design/pro-provider';
4import { ErrorBoundary } from '@ant-design/pro-utils';
5import React from 'react';
6
7var WrapContent = function WrapContent(props) {
8 var _props$autoClearCache = props.autoClearCache,
9 autoClearCache = _props$autoClearCache === void 0 ? true : _props$autoClearCache,
10 style = props.style,
11 className = props.className,
12 children = props.children;
13 var ErrorComponent = props.ErrorBoundary || ErrorBoundary;
14 return /*#__PURE__*/React.createElement(ConfigProviderWrap, {
15 autoClearCache: autoClearCache
16 }, props.ErrorBoundary === false ? /*#__PURE__*/React.createElement(_Layout.Content, {
17 className: className,
18 style: style
19 }, children) : /*#__PURE__*/React.createElement(ErrorComponent, null, /*#__PURE__*/React.createElement(_Layout.Content, {
20 className: className,
21 style: style
22 }, children)));
23};
24
25export default WrapContent;
\No newline at end of file