Skip to content

Commit

Permalink
Merge branch 'production' of https://github.com/huridocs/uwazi into s…
Browse files Browse the repository at this point in the history
…taging
  • Loading branch information
mfacar committed May 23, 2024
2 parents 8b9337f + 0c70346 commit 7796ed2
Show file tree
Hide file tree
Showing 35 changed files with 544 additions and 443 deletions.
38 changes: 0 additions & 38 deletions app/react/App/ErrorHandling/ErrorBoundary.tsx

This file was deleted.

41 changes: 0 additions & 41 deletions app/react/App/ErrorHandling/ErrorFallback.tsx

This file was deleted.

25 changes: 0 additions & 25 deletions app/react/App/ErrorHandling/ErrorUtils.ts

This file was deleted.

25 changes: 0 additions & 25 deletions app/react/App/ErrorHandling/RouteErrorBoundary.tsx

This file was deleted.

46 changes: 0 additions & 46 deletions app/react/App/ErrorHandling/specs/ErrorBoundary.spec.tsx

This file was deleted.

52 changes: 0 additions & 52 deletions app/react/App/ErrorHandling/specs/ErrorFallback.spec.tsx

This file was deleted.

90 changes: 0 additions & 90 deletions app/react/App/ErrorHandling/specs/GeneralError.spec.tsx

This file was deleted.

4 changes: 4 additions & 0 deletions app/react/App/Root.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,9 @@ class Root extends Component {
innerHtml += `window.__user__ = ${serialize(this.props.user, { isJSON: true })};`;
}

if (this.props.loadingError) {
innerHtml += `window.__loadingError__ = ${serialize(this.props.loadingError, { isJSON: true })};`;
}
if (this.props.atomStoreData) {
innerHtml += `window.__atomStoreData__ = ${serialize(this.props.atomStoreData, { isJSON: true })};`;
}
Expand Down Expand Up @@ -129,6 +132,7 @@ Root.propTypes = {
content: PropTypes.string,
language: PropTypes.string,
assets: PropTypes.object,
loadingError: PropTypes.object,
atomStoreData: PropTypes.object,
};

Expand Down
7 changes: 6 additions & 1 deletion app/react/App/RouteHandler.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,13 @@ class RouteHandler extends Component {
constructor(props, context) {
super(props, context);
setLocale(getLocale(context));
this.state = {};
if ((!this.isRenderedFromServer() || props.location?.state?.isClient) && isClient) {
this.getClientState(this.props);
this.getClientState(this.props).catch(ex => {
// used in inherited types
// eslint-disable-next-line react/no-unused-state
this.setState({ loadingError: ex });
});
}
}

Expand Down
Loading

0 comments on commit 7796ed2

Please sign in to comment.