Client: replace deprecated method 'componentWillReceiveProps'

This commit is contained in:
Sam 2018-05-28 11:49:58 +02:00
parent 63f64d8acb
commit 9f9bda005a

View File

@ -12,9 +12,9 @@ import { isLoggedIn } from '../../utils'
class UserForm extends React.Component {
componentWillReceiveProps(nextProps) {
componentDidUpdate(prevProps) {
if (
(nextProps.location.pathname !== this.props.location.pathname)
(prevProps.location.pathname !== this.props.location.pathname)
) {
this.props.onEmptyForm()
}