diff options
Diffstat (limited to 'animism-align/frontend/app/views/auth/auth.gate.js')
| -rw-r--r-- | animism-align/frontend/app/views/auth/auth.gate.js | 15 |
1 files changed, 3 insertions, 12 deletions
diff --git a/animism-align/frontend/app/views/auth/auth.gate.js b/animism-align/frontend/app/views/auth/auth.gate.js index ba69256..36d4af8 100644 --- a/animism-align/frontend/app/views/auth/auth.gate.js +++ b/animism-align/frontend/app/views/auth/auth.gate.js @@ -14,23 +14,14 @@ class AuthGate extends Component { } componentDidUpdate(prevProps) { - if (this.props.user_id !== prevProps.user_id) { + if (this.props.user.id !== prevProps.user.id) { this.load() } } load() { - if (!this.props.user_id) return - actions.user.show(this.props.user_id) - .then(() => { - actions.site.loadProject() - }).catch(error => { - if (error.status_code === 401) { - actions.auth.logout() - } else { - console.error(error) - } - }) + if (!this.props.user.id) return + actions.site.loadProject() } render() { |
