diff --git a/resources/assets/js/App.vue b/resources/assets/js/App.vue index af2261b9..10671974 100644 --- a/resources/assets/js/App.vue +++ b/resources/assets/js/App.vue @@ -26,11 +26,11 @@ diff --git a/resources/assets/js/components/artist/ArtistCard.vue b/resources/assets/js/components/artist/ArtistCard.vue index 7ffbdf83..ad637c1e 100644 --- a/resources/assets/js/components/artist/ArtistCard.vue +++ b/resources/assets/js/components/artist/ArtistCard.vue @@ -39,16 +39,14 @@ diff --git a/resources/assets/js/components/layout/main-wrapper/MainContent.vue b/resources/assets/js/components/layout/main-wrapper/MainContent.vue index 30a5e119..9d79a0ae 100644 --- a/resources/assets/js/components/layout/main-wrapper/MainContent.vue +++ b/resources/assets/js/components/layout/main-wrapper/MainContent.vue @@ -36,8 +36,8 @@ import { defineAsyncComponent, onMounted, ref, toRef } from 'vue' import { requireInjection } from '@/utils' import { preferenceStore } from '@/stores' -import { useThirdPartyServices } from '@/composables' -import { CurrentSongKey, RouterKey } from '@/symbols' +import { useRouter, useThirdPartyServices } from '@/composables' +import { CurrentSongKey } from '@/symbols' import HomeScreen from '@/components/screens/HomeScreen.vue' import QueueScreen from '@/components/screens/QueueScreen.vue' @@ -64,16 +64,16 @@ const NotFoundScreen = defineAsyncComponent(() => import('@/components/screens/N const VisualizerScreen = defineAsyncComponent(() => import('@/components/screens/VisualizerScreen.vue')) const { useYouTube } = useThirdPartyServices() +const { resolveRoute, onRouteChanged } = useRouter() -const router = requireInjection(RouterKey) const currentSong = requireInjection(CurrentSongKey, ref(null)) const showAlbumArtOverlay = toRef(preferenceStore.state, 'showAlbumArtOverlay') const screen = ref('Home') -router.onRouteChanged(route => (screen.value = route.screen)) +onRouteChanged(route => (screen.value = route.screen)) -onMounted(() => router.resolve()) +onMounted(() => resolveRoute())