--- import Layout from "@layouts/Layout.astro"; import AssociatedMedia from "@components/blocks/AssociatedMedia.astro"; import { IconArrowLeft } from "@tabler/icons-react"; import { fetchGenreByUrl } from "@utils/data/dynamic/genreByUrl.js"; import { mediaLinks } from "@utils/helpers/media.js"; import { md } from "@utils/helpers/general.js"; const genre = await fetchGenreByUrl(Astro.url.pathname); if (!genre) return Astro.redirect("/404", 404); const artistCount = genre.artists?.length || 0; const connectingWords = artistCount > 1 ? "artists are" : "artist is"; const genreMediaLinks = mediaLinks(genre.artists, "artist", 5); const pageTitle = `${genre.name} / Music`; const description = `Discover the music genre ${genre.name}, featuring ${artistCount} artists and ${genre.total_plays} total track plays.`; --- Back to music

{genre.name}

{ genreMediaLinks && ( <>

My top {genre.name}{" "} {connectingWords} I've listened to{" "} {genre.total_plays}{" "} tracks from this genre.


) } { genre.description && ( <>

Overview

Continue reading at Wikipedia.

Wikipedia content provided under the terms of the{" "} Creative Commons BY-SA license

) }