import { notFound } from "next/navigation"; import { Box, Container, Title, Text, Image, Stack, Grid, GridCol } from "@mantine/core"; import { albums } from "../../../lib/list"; import BackButton from "../../../Components/BackButton"; import { getThemeColors } from "@/lib/themes"; import TrackCard from "@/Components/TrackCard"; export function generateStaticParams() { return albums.map((album) => ({ albumId: album.id, })); } export async function generateMetadata({ params }: { params: Promise<{ albumId: string }> }) { const { albumId } = await params; const album = albums.find((a) => a.id === albumId); if (!album) { return { title: "Album Not Found", }; } return { title: `${album.label} - Linkin Park Albums`, description: album.description, }; } export default async function AlbumDetail({ params }: { params: Promise<{ albumId: string }> }) { const { albumId } = await params; const album = albums.find((a) => a.id === albumId); if (!album) { notFound(); } const theme = getThemeColors(albumId); return ( {/* Back Button */} {album.label} <span style={{ viewTransitionName: `album-card-title-${album.id}` }}>{album.label}</span> Released: {new Date(album.releaseDate).toLocaleDateString("en-US", { year: "numeric", month: "long", day: "numeric", })} {album.description} {/* Track List */} {album.tracks.length > 0 && ( Track List {album.tracks.map((track, index) => ( ))} )} ); }