Proof of concept on API calls...

...remains unproven.
This commit is contained in:
Daniel J. Summers
2017-08-06 23:17:08 -05:00
parent 5a7a74c167
commit 15947abcbf
9 changed files with 135 additions and 51 deletions
+9 -1
View File
@@ -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>