From 937f13581e4c18fb5d146a1a6baa7516c976be60 Mon Sep 17 00:00:00 2001 From: Nikita Date: Tue, 23 Dec 2025 14:16:48 -0800 Subject: [PATCH] Fix Spotify now playing text and link rendering in StreamPage component --- packages/web/src/routes/$username.tsx | 77 +++++++-------------------- 1 file changed, 18 insertions(+), 59 deletions(-) diff --git a/packages/web/src/routes/$username.tsx b/packages/web/src/routes/$username.tsx index 52cfef7c..d4982f91 100644 --- a/packages/web/src/routes/$username.tsx +++ b/packages/web/src/routes/$username.tsx @@ -241,8 +241,10 @@ function StreamPage() { const nowPlayingArtists = nowPlayingTrack?.artists.length ? nowPlayingTrack.artists.join(", ") : null - const nowPlayingEmbedUrl = nowPlayingTrack?.id - ? `https://open.spotify.com/embed/${nowPlayingTrack.type}/${nowPlayingTrack.id}?utm_source=linsa&theme=0` + const nowPlayingText = nowPlayingTrack + ? nowPlayingArtists + ? `${nowPlayingArtists} — ${nowPlayingTrack.title}` + : nowPlayingTrack.title : null return ( @@ -318,74 +320,31 @@ function StreamPage() {

Not live right now

- -
-

- {nowPlaying?.isPlaying ? "Currently playing" : "Spotify"} -

- +
{nowPlayingLoading ? ( -

Checking Spotify...

+ Checking Spotify... ) : nowPlaying?.isPlaying && nowPlayingTrack ? ( -
-
- {nowPlayingTrack.imageUrl ? ( - Spotify cover art - ) : ( -
- )} -
-

- {nowPlayingTrack.title} -

- {nowPlayingArtists ? ( -

- {nowPlayingArtists} -

- ) : null} - {nowPlayingTrack.album ? ( -

- {nowPlayingTrack.album} -

- ) : null} -
-
- - {nowPlayingEmbedUrl ? ( -