disable sidebar lyrics fetcher if panel is closed

This commit is contained in:
jeffvli
2025-12-12 21:21:41 -08:00
parent ed5d590a6b
commit 8f1141b6e0
2 changed files with 4 additions and 3 deletions
@@ -53,6 +53,9 @@ const BottomPanel = () => {
const { data: lyricsData } = useQuery( const { data: lyricsData } = useQuery(
lyricsQueries.songLyrics( lyricsQueries.songLyrics(
{ {
options: {
enabled: showLyricsInSidebar && !!currentSong?.id,
},
query: { songId: currentSong?.id || '' }, query: { songId: currentSong?.id || '' },
serverId: currentSong?._serverId || '', serverId: currentSong?._serverId || '',
}, },
@@ -550,9 +550,7 @@ export const MobileFullscreenPlayer = () => {
variant={isPageHovered ? 'default' : 'subtle'} variant={isPageHovered ? 'default' : 'subtle'}
/> />
</div> </div>
<div className={styles.lyricsContent}> <div className={styles.lyricsContent}>{isLyricsState && <Lyrics />}</div>
<Lyrics />
</div>
</motion.div> </motion.div>
</MobilePlayerContainer> </MobilePlayerContainer>
); );