From 64cf136850185aafe9b2b62a92f0930727af8f2a Mon Sep 17 00:00:00 2001 From: m4x809 Date: Sat, 25 Oct 2025 01:41:23 +0200 Subject: [PATCH] Refactor AlbumCard and AlbumDetail components to enhance view transitions - Wrapped album title and release date in span elements to apply view transition names, improving animation consistency. - Updated styling for album title and release date to maintain visual integrity with dynamic theming. --- src/Components/AlbumCard.tsx | 18 +++++++++--------- src/app/album/[albumId]/page.tsx | 18 +++++++++--------- 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/src/Components/AlbumCard.tsx b/src/Components/AlbumCard.tsx index ccd5ab5..690063a 100644 --- a/src/Components/AlbumCard.tsx +++ b/src/Components/AlbumCard.tsx @@ -72,26 +72,26 @@ export default function AlbumCard({ album }: { album: Album }) { fw={700} className="transition-colors" style={{ - viewTransitionName: `album-card-title-${album.id}`, color: theme.text.primary, }} > - {label} + {label} - Released: - {new Date(releaseDate).toLocaleDateString("en-US", { - year: "numeric", - month: "long", - day: "numeric", - })} + + Released: + {new Date(releaseDate).toLocaleDateString("en-US", { + year: "numeric", + month: "long", + day: "numeric", + })} + diff --git a/src/app/album/[albumId]/page.tsx b/src/app/album/[albumId]/page.tsx index 6190517..75d5b07 100644 --- a/src/app/album/[albumId]/page.tsx +++ b/src/app/album/[albumId]/page.tsx @@ -79,27 +79,27 @@ export default async function AlbumDetail({ params }: { params: Promise<{ albumI order={1} className="mb-3 text-6xl font-bold" style={{ - viewTransitionName: `album-card-title-${album.id}`, color: theme.text.primary, textShadow: `0 0 20px ${theme.primary.DEFAULT}80`, }} > - {album.label} + {album.label} - Released: - {new Date(album.releaseDate).toLocaleDateString("en-US", { - year: "numeric", - month: "long", - day: "numeric", - })} + + Released: + {new Date(album.releaseDate).toLocaleDateString("en-US", { + year: "numeric", + month: "long", + day: "numeric", + })} + {album.description}