Settings Created lifehook was incorrectly under methods

This commit is contained in:
2019-06-30 22:35:54 +02:00
parent 74704fbdee
commit e06850ebe6

View File

@@ -30,7 +30,7 @@
</section> </section>
</div> </div>
<section class="not-found" v-if="!userLoggedIn"> <section class="not-found" v-else>
<div class="not-found__content"> <div class="not-found__content">
<h2 class="not-found__title">Authentication Request Failed</h2> <h2 class="not-found__title">Authentication Request Failed</h2>
<router-link :to="{name: 'signin'}" exact title="Sign in here"> <router-link :to="{name: 'signin'}" exact title="Sign in here">
@@ -79,15 +79,13 @@ export default {
.catch((error) => { .catch((error) => {
console.log('error: ', error) console.log('error: ', error)
}) })
}
}, },
created(){ created(){
document.title = 'Settings' + storage.pageTitlePostfix; document.title = 'Settings' + storage.pageTitlePostfix;
storage.backTitle = document.title; storage.backTitle = document.title;
if(!localStorage.getItem('token')){ if (localStorage.getItem('token')){
this.userLoggedIn = false; this.userLoggedIn = true
} else {
this.userLoggedIn = true;
}
} }
} }
} }