refactor: don't make API calls directly
This commit is contained in:
parent
9217ca8476
commit
a6136f6cb2
8 changed files with 115 additions and 47 deletions
|
@ -26,8 +26,7 @@ const TimelineMenu = {
|
|||
},
|
||||
data () {
|
||||
return {
|
||||
isOpen: false,
|
||||
listTitle: null
|
||||
isOpen: false
|
||||
}
|
||||
},
|
||||
created () {
|
||||
|
@ -60,9 +59,7 @@ const TimelineMenu = {
|
|||
return '#' + this.$route.params.tag
|
||||
}
|
||||
if (route === 'list-timeline') {
|
||||
this.$store.state.api.backendInteractor.getList({ id: this.$route.params.id })
|
||||
.then((data) => { this.listTitle = data.title })
|
||||
return this.listTitle
|
||||
return this.$store.getters.findListTitle(this.$route.params.id)
|
||||
}
|
||||
const i18nkey = timelineNames()[this.$route.name]
|
||||
return i18nkey ? this.$t(i18nkey) : route
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue