fix(newsletter): Don't make API request if email is the same

This commit is contained in:
Ben Gotow 2016-01-20 17:02:54 -08:00
parent 2ce24bd4af
commit ba606fff21

View file

@ -14,7 +14,7 @@ class NewsletterSignup extends React.Component
@state = {status: 'Pending'} @state = {status: 'Pending'}
componentWillReceiveProps: (nextProps) => componentWillReceiveProps: (nextProps) =>
@_onGetStatus(nextProps) @_onGetStatus(nextProps) if not _.isEqual(@props, nextProps)
componentDidMount: => componentDidMount: =>
@_onGetStatus() @_onGetStatus()