Skip to content

feat: add top track play button to #1 featured artist#25

Merged
kevinle623 merged 2 commits intomainfrom
claude/add-play-top-artist-dKhA1
Mar 27, 2026
Merged

feat: add top track play button to #1 featured artist#25
kevinle623 merged 2 commits intomainfrom
claude/add-play-top-artist-dKhA1

Conversation

@kevinle623
Copy link
Copy Markdown
Owner

Summary

  • Adds a new /api/artists/[id]/top-tracks endpoint that fetches the artist's top tracks from Spotify
  • Renders a clickable "Top Track" strip on the Update README content with relevant information #1 FeaturedArtist hero card — album art, track name, and a Spotify-green play button that opens the track directly in Spotify
  • The existing ArrowUpRight button remains to navigate to the artist's Spotify profile page

Changes

  • types/spotify.ts — added SpotifyArtistTopTracksResponse
  • server/services/spotify-data-service.ts — added getArtistTopTracks
  • app/api/artists/[id]/top-tracks/route.ts — new API route (auth-gated via withSpotifyAuth)
  • client/services/artist-service.ts — client fetch wrapper
  • client/hooks/use-artist-top-track.ts — SWR hook returning the artist's Update README content with relevant information #1 track
  • client/components/top/FeaturedArtist.tsx — converted to "use client", fetches and renders top track strip

Test plan

  • Visit /artists while logged in
  • Confirm the Update README content with relevant information #1 featured artist card shows a "Top Track" strip below the genre tags
  • Clicking the play button opens the track in Spotify (new tab)
  • Clicking the ArrowUpRight button opens the artist profile in Spotify (new tab)
  • Strip does not appear while loading or if the API returns no tracks

https://claude.ai/code/session_01KmBA3fkihdEK2NVbhfgJPj

Fetches the artist's most popular track via a new /api/artists/[id]/top-tracks
endpoint and renders it as a clickable strip on the FeaturedArtist hero card,
with album art, track name, and a Spotify-green play button that opens the
track directly in Spotify.

https://claude.ai/code/session_01KmBA3fkihdEK2NVbhfgJPj
@vercel
Copy link
Copy Markdown

vercel Bot commented Mar 27, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
statify-2pfb Ready Ready Preview, Comment Mar 27, 2026 3:42am

@kevinle623 kevinle623 merged commit 637ffeb into main Mar 27, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants