From ec8b0c51f872d2972a3deb6d6a836b9d9fd30141 Mon Sep 17 00:00:00 2001
From: schneefux <schneefux+commit@schneefux.xyz>
Date: Mon, 21 May 2018 15:55:52 +0200
Subject: Move query get/set into mixin

---
 src/TopTalentsBox.vue | 10 ++--------
 1 file changed, 2 insertions(+), 8 deletions(-)

(limited to 'src/TopTalentsBox.vue')

diff --git a/src/TopTalentsBox.vue b/src/TopTalentsBox.vue
index e0e7cfb..e84b366 100644
--- a/src/TopTalentsBox.vue
+++ b/src/TopTalentsBox.vue
@@ -30,10 +30,12 @@
 import Vue from 'vue';
 import TalentImage from './TalentImage.vue';
 import HeroImage from './HeroImage.vue';
+import RouterParamMixin from './RouterParamMixin.js';
 import * as maps from './maps/maps';
 
 export default Vue.component('hero-search-box', {
   props: [ 'reportService' ],
+  mixins: [ RouterParamMixin ],
   data: function() {
     return {
       getHero: maps.getHero,
@@ -41,17 +43,9 @@ export default Vue.component('hero-search-box', {
     };
   },
   computed: {
-    selectedMode: {
-      get: function() {
-        return this.$route.query.mode;
-      },
-    },
     top10Talents: function() {
       return this.reportService.getTop10Picks(this.selectedMode);
     },
-    totalPicks: function() {
-      return this.reportService.getTotalPicks(this.selectedMode);
-    },
   },
   components: {
     TalentImage,
-- 
cgit v1.3.1

