feat: update album loading to support alphabetical order and adjust layout for better responsiveness

This commit is contained in:
2025-06-19 22:58:49 +00:00
committed by GitHub
parent ddd3986f0d
commit 98b348bb34
4 changed files with 13 additions and 11 deletions

View File

@@ -59,14 +59,14 @@ export default function MusicPage() {
{isLoading ? (
// Loading skeletons
Array.from({ length: 6 }).map((_, i) => (
<div key={i} className="w-[300px] h-[300px] bg-muted animate-pulse rounded-md" />
<div key={i} className="w-[300px] h-[300px] bg-muted animate-pulse rounded-md flex-shrink-0" />
))
) : (
recentAlbums.map((album) => (
<AlbumArtwork
key={album.id}
album={album}
className="w-[300px]"
className="w-[300px] flex-shrink-0"
aspectRatio="square"
width={300}
height={300}
@@ -92,14 +92,14 @@ export default function MusicPage() {
{isLoading ? (
// Loading skeletons
Array.from({ length: 10 }).map((_, i) => (
<div key={i} className="w-[150px] h-[150px] bg-muted animate-pulse rounded-md" />
<div key={i} className="w-[150px] h-[150px] bg-muted animate-pulse rounded-md flex-shrink-0" />
))
) : (
newestAlbums.map((album) => (
<AlbumArtwork
key={album.id}
album={album}
className="w-[150px]"
className="w-[150px] flex-shrink-0"
aspectRatio="square"
width={150}
height={150}