From f3d3f4c21fff2d8be06b136a73986214574c3c98 Mon Sep 17 00:00:00 2001 From: Ramon Wenger Date: Tue, 30 Jun 2020 18:06:34 +0200 Subject: [PATCH] Refactor last topic route --- .../book-navigation/ContentNavigation.vue | 14 -------------- client/src/mixins/me.js | 14 ++++++++++++++ 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/client/src/components/book-navigation/ContentNavigation.vue b/client/src/components/book-navigation/ContentNavigation.vue index 1fb79fe1..23f57d1a 100644 --- a/client/src/components/book-navigation/ContentNavigation.vue +++ b/client/src/components/book-navigation/ContentNavigation.vue @@ -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; diff --git a/client/src/mixins/me.js b/client/src/mixins/me.js index bcd8d734..725162c8 100644 --- a/client/src/mixins/me.js +++ b/client/src/mixins/me.js @@ -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,