diff --git a/src/components/MusicComponent.js b/src/components/MusicComponent.js index a35b7a4..75d5394 100644 --- a/src/components/MusicComponent.js +++ b/src/components/MusicComponent.js @@ -121,21 +121,21 @@ const MusicComponent = ({ song, min, max, onDecision }) => { onTouchEnd={handleTouchEnd} style={{ transform: `translateX(${positionX}px)` }} ref={containerRef}> - {song.set &&
{song.name}
-{song.artist}
- {min < 0 &&<--- {song.disagree} no - {song.agree} yes --->
} +{song[0]?.name || song.name}
+{song[0]?.artist || song.artist}
+ {min < 0 &&<--- {song[2]?.length} no - {song[1]?.length} yes --->
}{song.length}
+{song[0]?.length || song.length}
); }; diff --git a/src/components/MusicPlayer.js b/src/components/MusicPlayer.js index a684588..d3df5f6 100644 --- a/src/components/MusicPlayer.js +++ b/src/components/MusicPlayer.js @@ -85,9 +85,9 @@ export function MusicPlayer({ socket, shopId, user, shopOwnerId, isSpotifyNeedLo const fetchColor = async () => { if ( currentSong && - currentSong.image + currentSong[0]?.image ) { - const imageUrl = currentSong.image; + const imageUrl = currentSong[0].image; try { const dominantColor = await getDominantColor(imageUrl); // Calculate luminance (YIQ color space) to determine if subtitle should be black or white @@ -429,8 +429,8 @@ export function MusicPlayer({ socket, shopId, user, shopOwnerId, isSpotifyNeedLo