I am creating simple app using vuex and vue-router that renders movies and shows on different routes and search option for both. Movies and shows are in separate components and my search - input element is in Layout.vue component. I made a search option for movies through vuex that works properly and now I want to setup search option for shows. 
Now I wonder if it's possible to setup search option through vuex to trigger search for movies only when I am on '/movies' route and trigger search for shows only when I am on '/shows' route ?

store.js

```
const getters = {
  filterMovies: state => {
    return state.movies.filter(movie => {
      return movie.title.toLowerCase().match(state.textSearch.toLowerCase())
    })
  },
  movie: state => state.movie
};

const mutations = {
  setMovies: (state, items) => (state.movies = items),
  setMovie: (state, items) => (state.movie = items),
  setLoading: (state, payload) => (state.loading = payload),

  updateSearch: (state, payload) => (state.textSearch = payload)
};

```

Layout.vue

```
  methods: {
    updateSearch(e) {
      this.$store.commit('updateSearch', e.target.value)
    }

```