From f8c7537ff649805084895d1689f06dd2e47a3b5d Mon Sep 17 00:00:00 2001 From: Nogic <24802730+nogic1008@users.noreply.github.com> Date: Thu, 2 Mar 2023 10:36:00 +0900 Subject: [PATCH] fix(page): use redirect link on /songs page --- pages/songs/index.vue | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pages/songs/index.vue b/pages/songs/index.vue index 875a287b2..1563280ae 100644 --- a/pages/songs/index.vue +++ b/pages/songs/index.vue @@ -20,7 +20,7 @@ v-for="slug in (props.row as (typeof songs[number])).series" :key="slug" class="button is-small" - :to="`/series/${slug}`" + :to="getLinks(slug)" :style="{ backgroundColor: seriesList[slug].backgroundColor, color: seriesList[slug].color, @@ -56,4 +56,7 @@ const { songs } = await useSongList( 'artist', 'bpm' ) + +const getLinks = (slug: keyof typeof seriesList) => + (seriesList[slug] as { redirect?: string }).redirect ?? `/series/${slug}`