22 lines
376 B
Vue
22 lines
376 B
Vue
<template>
|
|
<div>
|
|
<h1>{{ msg }}</h1>
|
|
<p v-if="user.authenticated">Logged in.</p>
|
|
<p v-else-if="!user.authenticated">not logged in. <router-link to="/login">Login</router-link></p>
|
|
</div>
|
|
</template>
|
|
|
|
<script>
|
|
import auth from '../auth'
|
|
|
|
export default {
|
|
name: 'Home',
|
|
data () {
|
|
return {
|
|
msg: 'Welcome',
|
|
user: auth.user
|
|
}
|
|
}
|
|
}
|
|
</script>
|