feat: add API availability checks and fallback for cover art in various components
This commit is contained in:
@@ -57,9 +57,8 @@ export function AlbumArtwork({
|
||||
starItem(album.id, 'album');
|
||||
}
|
||||
};
|
||||
|
||||
// Get cover art URL with proper fallback
|
||||
const coverArtUrl = album.coverArt
|
||||
const coverArtUrl = album.coverArt && api
|
||||
? api.getCoverArtUrl(album.coverArt, 300)
|
||||
: '/default-user.jpg';
|
||||
|
||||
|
||||
@@ -52,9 +52,8 @@ export function ArtistIcon({
|
||||
starItem(artist.id, 'artist');
|
||||
}
|
||||
};
|
||||
|
||||
// Get cover art URL with proper fallback
|
||||
const artistImageUrl = artist.coverArt
|
||||
const artistImageUrl = artist.coverArt && api
|
||||
? api.getCoverArtUrl(artist.coverArt, 200)
|
||||
: '/default-user.jpg';
|
||||
|
||||
|
||||
Reference in New Issue
Block a user