diff --git a/src/pages/playlists/[playlistId]/snapshots/[commitSha].astro b/src/pages/playlists/[playlistId]/snapshots/[commitSha].astro index 4317cfe..f2df3a7 100644 --- a/src/pages/playlists/[playlistId]/snapshots/[commitSha].astro +++ b/src/pages/playlists/[playlistId]/snapshots/[commitSha].astro @@ -20,13 +20,13 @@ if (layoutProps.playlist) { ); if (!githubResponse.ok) { - throw new Error(githubResponse.status.toString()); + throw new Error(`GitHub ${githubResponse.status}`); } snapshot = (await githubResponse.json()) as PlaylistSnapshot; layoutProps.description = decode(snapshot.description, { level: 'html5' }); } catch (error) { - const isNotFoundError = (error as Error).message === '404'; + const isNotFoundError = (error as Error).message === 'GitHub 404'; layoutProps.errorOccurred = true; layoutProps.title = 'Error'; @@ -44,8 +44,7 @@ if (layoutProps.playlist) {

{layoutProps.description}

@@ -61,23 +60,28 @@ if (layoutProps.playlist) { snapshot?.tracks.map((track) => ( - - + + )) }
+ Title {track.name} - {track.artists.map((artist) => ( - - {artist.name} - - ))} + Artist(s) + + {track.artists.map((artist) => ( + + {artist.name} + + ))} + + Album {getFormattedDate(track.added_at)}{formatDuration(track.duration_ms)} + Date added + {getFormattedDate(track.added_at)} + + Duration + {formatDuration(track.duration_ms)} +