@zydon/common 2.2.75 → 2.2.77
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/utils/loadable.js +4 -4
- package/package.json +1 -1
package/dist/utils/loadable.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { a } from '../chunk-FK7DDO5L.js';
|
|
2
|
-
import { Suspense,
|
|
3
|
-
import { jsx } from 'react/jsx-runtime';
|
|
2
|
+
import { Suspense, Component, useEffect } from 'react';
|
|
3
|
+
import { jsx, Fragment } from 'react/jsx-runtime';
|
|
4
4
|
|
|
5
|
-
var t=class extends Component{constructor(r){super(r),this.state={hasError:!1};}static getDerivedStateFromError(r){return {hasError:!0}}componentDidCatch(r,
|
|
5
|
+
var u=()=>(useEffect(()=>{window.location.reload();},[]),null),s=u;var t=class extends Component{constructor(r){super(r),this.state={hasError:!1,reloadPage:!1};}static getDerivedStateFromError(r){return r.message.startsWith("Failed to fetch dynamically imported module:")?{hasError:!0,reloadPage:!0}:{hasError:!0,reloadPage:!1}}componentDidCatch(r,o){console.error("Error caught in error boundary:",r,o);}render(){return this.state.hasError&&this.state.reloadPage?jsx(s,{}):this.state.hasError?this.props.fallback||jsx(Fragment,{children:"Ocorreu um erro inesperado. Atualize a p\xE1gina e tente novamente."}):this.props.children}},l=t;var E=a$1=>function(o){return jsx(l,{children:jsx(Suspense,{fallback:jsx(a,{}),children:jsx(a$1,{...o})})})},w=E;
|
|
6
6
|
|
|
7
|
-
export {
|
|
7
|
+
export { w as default };
|