Refactor last topic route

This commit is contained in:
Ramon Wenger 2020-06-30 18:06:34 +02:00
parent f4f9b7c1a1
commit f3d3f4c21f
2 changed files with 14 additions and 14 deletions

View File

@ -90,20 +90,6 @@
Logo
},
computed: {
topicRoute() {
if (this.me.lastTopic && this.me.lastTopic.slug) {
return {
name: 'topic',
params: {
topicSlug: this.me.lastTopic.slug
}
}
}
return '/book/topic/berufliche-grundbildung'
}
},
methods: {
isActive(linkName) {
return linkName === 'book' && this.$route.path.indexOf('module') > -1;

View File

@ -15,6 +15,20 @@ export default {
}
},
computed: {
topicRoute() {
if (this.me.lastTopic && this.me.lastTopic.slug) {
return {
name: 'topic',
params: {
topicSlug: this.me.lastTopic.slug
}
}
}
return '/book/topic/berufliche-grundbildung'
}
},
apollo: {
me: {
query: ME_QUERY,