Fixes for tests
This commit is contained in:
@@ -30,13 +30,16 @@
|
||||
large: "w-48",
|
||||
};
|
||||
|
||||
const isMusicType = $derived(
|
||||
"type" in item && (item.type === "Audio" || item.type === "MusicAlbum" || item.type === "MusicArtist" || item.type === "Playlist")
|
||||
);
|
||||
|
||||
const aspectRatio = $derived(() => {
|
||||
if ("type" in item) {
|
||||
// MediaItem
|
||||
return item.type === "Audio" || item.type === "MusicAlbum" ? "aspect-square" : "aspect-[2/3]";
|
||||
return isMusicType ? "aspect-square" : "aspect-[2/3]";
|
||||
}
|
||||
// Library
|
||||
return "aspect-video";
|
||||
return "collectionType" in item && item.collectionType === "music" ? "aspect-square" : "aspect-video";
|
||||
});
|
||||
|
||||
const imageTag = $derived(
|
||||
|
||||
Reference in New Issue
Block a user