Browse Source

Fix login

master
Joshua Rubingh 5 months ago
parent
commit
136c884507
  1. 8
      pages/index.vue

8
pages/index.vue

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

Loading…
Cancel
Save