import { useClient } from 'hooks/useClient'; import { MicVocal } from 'lucide-react'; import { LyricsPane } from './LyricsPane'; import { useLyrics } from './useLyrics'; import { useLyricsOpen } from './useLyricsOpen'; import { useMusicPlayer } from './useMusicPlayer'; /** * The right-hand half of the /music detail panel when lyrics are on. It follows the PLAYING track, not * the browsed album — which is why it reads the player rather than taking props from the album view. */ export const LyricsPanel = () => { const { token } = useClient(); const { current } = useMusicPlayer(); const [, toggleLyrics] = useLyricsOpen(); const lyrics = useLyrics(current?.albumRel ?? '', current?.file ?? '', true, token); // `dark` is not decoration: the theme tokens are CSS variables scoped to a `.dark` ancestor, so marking // this subtree re-points foreground/muted-foreground/border at their dark values. Without it a light // theme would paint near-black text on the black sheet. return (

{current?.title ?? current?.file ?? 'Lyrics'}

{current?.artist &&

{current.artist}

}
{current ? ( ) : (
Play something to see its lyrics.
)}
); };