Skip to content
Snippets Groups Projects
Commit ab102646 authored by Konrad Mohrfeldt's avatar Konrad Mohrfeldt :koala:
Browse files

fix: update Vuex playlist store whenever the show changes

This might have been called at some other point in the past and got lost
in translation.
parent 542ae110
No related branches found
No related tags found
No related merge requests found
...@@ -2,7 +2,7 @@ import { defineDefaultAPIStoreOptions } from '@rokoli/bnb/drf' ...@@ -2,7 +2,7 @@ import { defineDefaultAPIStoreOptions } from '@rokoli/bnb/drf'
import BootstrapVue from 'bootstrap-vue' import BootstrapVue from 'bootstrap-vue'
import { merge } from 'lodash' import { merge } from 'lodash'
import { createPinia } from 'pinia' import { createPinia } from 'pinia'
import { createApp, watchEffect } from 'vue' import { createApp, watch, watchEffect } from 'vue'
import VueToast from 'vue-toast-notification' import VueToast from 'vue-toast-notification'
import VueLogger from 'vuejs-logger' import VueLogger from 'vuejs-logger'
...@@ -67,4 +67,13 @@ watchEffect(async () => { ...@@ -67,4 +67,13 @@ watchEffect(async () => {
} }
}) })
watch(
() => store.getters['shows/selectedShow'],
(show) => {
if (show) {
store.dispatch('playlists/fetch', { showSlug: show.slug })
}
},
)
void authStore.init() void authStore.init()
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment