Browse Source

Smoother login

master
Joshua Rubingh 5 months ago
parent
commit
95db93d041
  1. 8
      pages/index.vue

8
pages/index.vue

@ -11,7 +11,7 @@ @@ -11,7 +11,7 @@
</v-card-text>
<v-card-actions>
<v-btn :to="localePath('/researchStudies')">
<v-btn v-if="!isAuthenticated" :to="'/auth/login/?next=' + localePath('/researchStudies')">
{{ $t('page.landing.startButton') }}
</v-btn>
</v-card-actions>
@ -25,6 +25,7 @@ export default { @@ -25,6 +25,7 @@ export default {
data() {
return {
seed: +new Date(),
isAuthenticated: this.$store.getters['authorisation/isUser'],
}
},
head() {
@ -34,5 +35,10 @@ export default { @@ -34,5 +35,10 @@ export default {
title: $t('page.landing.title'),
}
},
mounted(){
if (this.$store.getters['authorisation/isUser']) {
this.$router.push(this.localePath('/researchStudies'))
}
},
}
</script>

Loading…
Cancel
Save