Refactor last topic route
This commit is contained in:
parent
f4f9b7c1a1
commit
f3d3f4c21f
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Reference in New Issue