Add some more autobinds
This commit is contained in:
@@ -2,6 +2,7 @@ import React from 'react'
|
||||
import { Route, Redirect } from 'react-router-dom'
|
||||
import { PropTypes } from 'prop-types'
|
||||
import { api } from 'src/API'
|
||||
import autobind from 'autobind-decorator'
|
||||
|
||||
export class ProtectedRoute extends React.Component {
|
||||
static propTypes = {
|
||||
@@ -15,11 +16,7 @@ export class ProtectedRoute extends React.Component {
|
||||
roles: ['administrator']
|
||||
}
|
||||
|
||||
constructor(props) {
|
||||
super(props)
|
||||
this.updateComponent = this.updateComponent.bind(this)
|
||||
}
|
||||
|
||||
@autobind
|
||||
updateComponent() {
|
||||
this.forceUpdate()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user