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/HeroDraftGrid.vue | 13 ++-----------
 1 file changed, 2 insertions(+), 11 deletions(-)

(limited to 'src/HeroDraftGrid.vue')

diff --git a/src/HeroDraftGrid.vue b/src/HeroDraftGrid.vue
index a130218..48dd466 100644
--- a/src/HeroDraftGrid.vue
+++ b/src/HeroDraftGrid.vue
@@ -27,10 +27,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-draft-grid', {
   props: [ 'reportService' ],
+  mixins: [ RouterParamMixin ],
   data: function() {
     return {
       actors: this.reportService.getActors(),
@@ -38,17 +40,6 @@ export default Vue.component('hero-draft-grid', {
       getTalentName: maps.getTalentName,
     };
   },
-  computed: {
-    selectedActor: {
-      get: function() {
-        return this.$route.query.actor;
-      },
-      set: function(value) {
-        const query = Object.assign({}, this.$route.query, { actor: value });
-        this.$router.push({ query });
-      },
-    },
-  },
   components: {
     TalentImage,
     HeroImage,
-- 
cgit v1.3.1

