Proof of concept on API calls...
...remains unproven.
This commit is contained in:
@@ -2,14 +2,22 @@
|
||||
article
|
||||
page-title(:title="title")
|
||||
p here you are!
|
||||
p(v-if="isLoadingJournal") journal is loading...
|
||||
p(v-if="!isLoadingJournal") journal has {{ journal.length }} entries
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapState } from 'vuex'
|
||||
import PageTitle from './PageTitle'
|
||||
|
||||
import * as actions from '@/store/action-types'
|
||||
|
||||
export default {
|
||||
name: 'dashboard',
|
||||
data () {
|
||||
this.$store.dispatch(actions.LOAD_JOURNAL)
|
||||
return {}
|
||||
},
|
||||
components: {
|
||||
PageTitle
|
||||
},
|
||||
@@ -17,7 +25,7 @@ export default {
|
||||
title () {
|
||||
return `${this.user.given_name}'s Dashboard`
|
||||
},
|
||||
...mapState(['user'])
|
||||
...mapState(['user', 'journal', 'isLoadingJournal'])
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user