Skip to content
This repository has been archived by the owner on Sep 7, 2023. It is now read-only.

fix(page): use redirect link on /songs page #780

Merged
merged 1 commit into from
Mar 2, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion pages/songs/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -56,4 +56,7 @@ const { songs } = await useSongList(
'artist',
'bpm'
)

const getLinks = (slug: keyof typeof seriesList) =>
(seriesList[slug] as { redirect?: string }).redirect ?? `/series/${slug}`
</script>