summaryrefslogtreecommitdiff
path: root/animism-align/frontend/app/views/auth/auth.gate.js
diff options
context:
space:
mode:
authorJules Laplace <julescarbon@gmail.com>2021-03-05 23:33:50 +0100
committerJules Laplace <julescarbon@gmail.com>2021-03-05 23:33:50 +0100
commitf6e6b1edbbb68bf6bf93a10deebd4cd55ffaff0f (patch)
treebb44de81746cfd088bfab49247b9ec8508bb4605 /animism-align/frontend/app/views/auth/auth.gate.js
parent6726fa9fe050aa47ff7f537b91705372e290f501 (diff)
use other login validator thingie
Diffstat (limited to 'animism-align/frontend/app/views/auth/auth.gate.js')
-rw-r--r--animism-align/frontend/app/views/auth/auth.gate.js15
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() {