Proyectos de Subversion LeadersLinked - SPA

Rev

Rev 2204 | Rev 2206 | Ir a la última revisión | Mostrar el archivo completo | | | Autoría | Ultima modificación | Ver Log |

Rev 2204 Rev 2205
Línea 2... Línea 2...
2
import { connect } from 'react-redux'
2
import { connect } from 'react-redux'
Línea 3... Línea 3...
3
 
3
 
Línea 4... Línea 4...
4
import { addNotification } from '@app/redux/notification/notification.actions'
4
import { addNotification } from '@app/redux/notification/notification.actions'
5
 
5
 
-
 
6
class ErrorBoundary extends React.Component {
6
class ErrorBoundary extends React.Component {
7
  componentDidCatch(error, errorInfo) {
7
  static handleError(error, errorInfo) {
-
 
8
    console.log('ErrorBoundary caught an error: ', error, errorInfo)
-
 
9
    console.log(error.details)
-
 
10
    console.log(error.message)
8
    console.log('Error message', error.message)
11
    console.log(errorInfo)
9
    console.log('ErrorBoundary caught an error: ', error, errorInfo)
Línea 12... Línea -...
12
    this.props.addNotification({ style: 'danger', msg: error.message })
-
 
13
  }
-
 
14
 
-
 
15
  componentDidCatch(error, errorInfo) {
-
 
16
    this.handleError(error, errorInfo)
10
    this.props.addNotification({ style: 'danger', msg: error.message })
17
  }
11
  }
18
 
12
 
19
  render() {
13
  render() {
Línea 20... Línea -...
20
    return this.props.children
-
 
21
  }
-
 
22
}
-
 
23
 
-
 
24
const mapDispatchToProps = {
14
    return this.props.children