feat: enhance SearchPage with improved no results message and replace img with Image component for better performance

This commit is contained in:
2025-06-20 01:18:04 +00:00
committed by GitHub
parent b70d232564
commit 0d69b10be0
4 changed files with 11 additions and 5 deletions

View File

@@ -110,7 +110,7 @@ export const FullScreenPlayer: React.FC<FullScreenPlayerProps> = ({ isOpen, onCl
return () => clearTimeout(scrollTimeout);
}
}, [currentLyricIndex, showLyrics]);
}, [currentLyricIndex, showLyrics, lyrics.length]);
// Reset lyrics to top when song changes
useEffect(() => {
@@ -135,7 +135,7 @@ export const FullScreenPlayer: React.FC<FullScreenPlayerProps> = ({ isOpen, onCl
return () => clearTimeout(resetTimeout);
}
}, [currentTrack?.id, showLyrics]); // Only reset when track ID changes
}, [currentTrack?.id, showLyrics, currentTrack]); // Only reset when track ID changes
// Sync with main audio player (improved responsiveness)
useEffect(() => {
@@ -167,7 +167,7 @@ export const FullScreenPlayer: React.FC<FullScreenPlayerProps> = ({ isOpen, onCl
const interval = setInterval(syncWithMainPlayer, 100);
return () => clearInterval(interval);
}
}, [isOpen, currentTrack?.id]); // React to track changes
}, [isOpen, currentTrack]); // React to track changes
// Extract dominant color from cover art
useEffect(() => {