add featured artists to playlist page

+ fetch album bio on raising bottom container
This commit is contained in:
geoffrey45
2022-07-08 16:39:16 +03:00
parent 9d5cbfcc93
commit 09c588c856
15 changed files with 154 additions and 84 deletions
+8 -4
View File
@@ -1,5 +1,5 @@
<template>
<Page>
<Page :onBottomRaised="fetchAlbumBio">
<template #header>
<Header :album="album.info" />
</template>
@@ -13,18 +13,22 @@
</template>
<script setup lang="ts">
import { onBeforeRouteUpdate, RouteLocationNormalized } from "vue-router";
import { onBeforeRouteUpdate, RouteLocationNormalized, RouteParams } from "vue-router";
import useAStore from "@/stores/pages/album";
import Page from "../layouts/HeaderContentBottom.vue";
import Page from "@/layouts/HeaderContentBottom.vue";
import Header from "./Header.vue";
import Content from "./Content.vue";
import Bottom from "./Bottom.vue";
import { onBeforeUnmount } from "vue";
const album = useAStore();
function fetchAlbumBio(params: RouteParams) {
album.fetchBio(params.hash.toString());
}
onBeforeRouteUpdate(async (to: RouteLocationNormalized) => {
await album.fetchTracksAndArtists(to.params.hash.toString());
album.fetchBio(to.params.hash.toString());
});
</script>