From 2da2ecff04f9b342d2cdbcf8738d90ad75279b1a Mon Sep 17 00:00:00 2001 From: razvanMiu Date: Fri, 18 Dec 2020 16:20:49 +0200 Subject: [PATCH] Restore default App --- .../volto/components/theme/App/App.jsx | 224 ------------------ 1 file changed, 224 deletions(-) delete mode 100644 src/customizations/volto/components/theme/App/App.jsx diff --git a/src/customizations/volto/components/theme/App/App.jsx b/src/customizations/volto/components/theme/App/App.jsx deleted file mode 100644 index a65d2bb1..00000000 --- a/src/customizations/volto/components/theme/App/App.jsx +++ /dev/null @@ -1,224 +0,0 @@ -/** - * App container. - * @module components/theme/App/App - */ - -import React, { Component, Fragment } from 'react'; -import PropTypes from 'prop-types'; -import { connect } from 'react-redux'; -import { compose } from 'redux'; -import { asyncConnect } from 'redux-connect'; -import { Segment } from 'semantic-ui-react'; -import { renderRoutes } from 'react-router-config'; -import { Slide, ToastContainer, toast } from 'react-toastify'; -import split from 'lodash/split'; -import join from 'lodash/join'; -import trim from 'lodash/trim'; -import cx from 'classnames'; - -import { settings, views } from '~/config'; - -import Error from '@plone/volto/error'; - -import { - Breadcrumbs, - Footer, - Header, - Icon, - OutdatedBrowser, - AppExtras, -} from '@plone/volto/components'; -import { BodyClass, getBaseUrl, getView, isCmsUi } from '@plone/volto/helpers'; -import { - getBreadcrumbs, - getContent, - getNavigation, - getTypes, - getWorkflow, -} from '@plone/volto/actions'; - -import clearSVG from '@plone/volto/icons/clear.svg'; -import MultilingualRedirector from '../MultilingualRedirector/MultilingualRedirector'; - -import * as Sentry from '@sentry/browser'; - -/** - * @export - * @class App - * @extends {Component} - */ -class App extends Component { - /** - * Property types. - * @property {Object} propTypes Property types. - * @static - */ - static propTypes = { - pathname: PropTypes.string.isRequired, - }; - - state = { - hasError: false, - error: null, - errorInfo: null, - }; - - /** - * @method componentWillReceiveProps - * @param {Object} nextProps Next properties - * @returns {undefined} - */ - UNSAFE_componentWillReceiveProps(nextProps) { - if (nextProps.pathname !== this.props.pathname) { - if (this.state.hasError) { - this.setState({ hasError: false }); - } - } - } - - /** - * ComponentDidCatch - * @method ComponentDidCatch - * @param {string} error The error - * @param {string} info The info - * @returns {undefined} - */ - componentDidCatch(error, info) { - this.setState({ hasError: true, error, errorInfo: info }); - if (__CLIENT__) { - if (window?.env?.RAZZLE_SENTRY_DSN || __SENTRY__?.SENTRY_DSN) { - Sentry.captureException(error); - } - } - } - - /** - * Render method. - * @method render - * @returns {string} Markup for the component. - */ - render() { - const path = getBaseUrl(this.props.pathname); - const action = getView(this.props.pathname); - const isCmsUI = isCmsUi(this.props.pathname); - const ConnectionRefusedView = views.errorViews.ECONNREFUSED; - return ( - - - - {/* Body class depending on content type */} - {this.props.content && this.props.content['@type'] && ( - - )} - - {/* Body class depending on sections */} - -
- - - -
- -

APP

- {/* {this.props.connectionRefused ? ( - - ) : this.state.hasError ? ( - - ) : ( - renderRoutes(this.props.route.routes, { - staticContext: this.props.staticContext, - }) - )} */} -
-
-
-