Skip to content
This repository has been archived by the owner on Apr 25, 2024. It is now read-only.

Commit

Permalink
volto 14 compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
nileshgulia1 committed Jan 5, 2022
1 parent 61592c6 commit c6b6c04
Show file tree
Hide file tree
Showing 5 changed files with 158 additions and 530 deletions.
8 changes: 1 addition & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,20 +23,14 @@
"@eeacms/volto-matomo"
],
"dependencies": {
"@blueprintjs/core": "^3.30.0",
"@blueprintjs/icons": "^3.19.0",
"@eeacms/volto-plotlycharts": "*",
"@eeacms/volto-addons-forest": "*",
"@eeacms/volto-datablocks": "2.0.16",
"@eeacms/volto-matomo": "*",
"raven-js": "3.27.2",
"recharts": "2.1.6",
"react-highlight-words": "^0.16.0",
"react-image-gallery": "1.2.7",
"react-lazy-load-image-component": "^1.5.0",
"react-stickynode": "^2.1.1",
"react-toastify": "^5.3.2",
"webpack-bundle-analyzer": "^3.6.0"
"react-stickynode": "^2.1.1"
},
"devDependencies": {
"@cypress/code-coverage": "^3.9.5",
Expand Down
24 changes: 5 additions & 19 deletions src/components/theme/CatalogueViews/AppHeader.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import PropTypes from 'prop-types';
import { connect } from 'react-redux';
import { compose } from 'redux';
import { asyncConnect } from 'redux-connect';
import loadable from '@loadable/component';

import { Header } from '@plone/volto/components';
import { BodyClass, getBaseUrl, getView } from '@plone/volto/helpers';
Expand All @@ -25,6 +24,7 @@ import {
} from '@eeacms/volto-forests-theme/actions';
import { getPortlets } from '@eeacms/volto-addons-forest/actions';
import config from '@plone/volto/registry';
import * as Sentry from '@sentry/browser';

class App extends Component {
static propTypes = {
Expand All @@ -41,21 +41,6 @@ class App extends Component {
errorInfo: null,
};

/**
* ComponentDidMount
* @method ComponentDidMount
* @param {string} error The error
* @param {string} info The info
* @returns {undefined}
*/
componentDidMount() {
// this.props.getDefaultHeaderImage();
if (__CLIENT__ && process.env.SENTRY_DSN) {
const Raven = loadable(() => import('raven-js'));

Raven.config(process.env.SENTRY_DSN).install();
}
}
// shouldComponentUpdate(nextProps, nextState) {
// if (nextProps.loadingContent.loading || nextProps.search.loading) {
// console.log('dont load');
Expand Down Expand Up @@ -89,9 +74,10 @@ class App extends Component {
*/
componentDidCatch(error, info) {
this.setState({ hasError: true, error, errorInfo: info });
if (__CLIENT__ && process.env.SENTRY_DSN) {
const Raven = loadable(() => import('raven-js'));
Raven.captureException(error, { extra: info });
if (__CLIENT__) {
if (window?.env?.RAZZLE_SENTRY_DSN || __SENTRY__?.SENTRY_DSN) {
Sentry.captureException(error);
}
}
}

Expand Down
Loading

0 comments on commit c6b6c04

Please sign in to comment.