1// A song's page, its listening: 👥 listen together (start a party on it, 2// or the party you are in), who has it open right now and how far through 3// they are (the lobby, narrowed to this song), and the live parties on it 4// to join. Listener songs have no parties (a party plays a site song from 5// this page's own build), so theirs is only who has it open. 6import { ListenTogether } from './ListenTogether.jsx'; 7import { LiveParties } from './LiveParties.jsx'; 8import { WhoIsListening } from './Lobby.jsx'; 9 10export function SongListening({ song, context }) { 11 const forSong = song.listenerId ? { listener: song.listenerId } : { song: song.id }; 12 return ( 13 <section className="not-prose my-3" aria-label="listening" data-testid="song-listening"> 14 {!song.listenerId && <ListenTogether song={song} />} 15 <WhoIsListening context={context} forSong={forSong} /> 16 {!song.listenerId && <LiveParties song={song.id} />} 17 </section> 18 ); 19}