A decentralized music tracking and discovery platform built on AT Protocol 🎵

Rename feedByUri to getScrobbleByUri and fix tags

+8 -8
+2 -2
apps/web/src/api/feed.ts
··· 1 1 import { client } from "."; 2 2 3 - export const getFeedByUri = async (uri: string) => { 3 + export const getScrobbleByUri = async (uri: string) => { 4 4 if (uri.includes("app.rocksky.song")) { 5 5 return null; 6 6 } ··· 19 19 albumArtist: response.data?.albumArtist, 20 20 album: response.data?.album, 21 21 cover: response.data?.cover, 22 - tags: [], 22 + tags: response.data?.tags, 23 23 artistUri: response.data?.artistUri, 24 24 albumUri: response.data?.albumUri, 25 25 listeners: response.data?.listeners || 1,
+4 -4
apps/web/src/hooks/useFeed.tsx
··· 1 1 import { useInfiniteQuery, useQuery } from "@tanstack/react-query"; 2 2 import { 3 - getFeedByUri, 3 + getScrobbleByUri, 4 4 getFeedGenerators, 5 5 getFeed, 6 6 getScrobbles, ··· 15 15 }, 16 16 }); 17 17 18 - export const useFeedByUriQuery = (uri: string) => 18 + export const useScrobbleByUriQuery = (uri: string) => 19 19 useQuery({ 20 - queryKey: ["feed", uri], 21 - queryFn: () => getFeedByUri(uri), 20 + queryKey: ["scrobble", uri], 21 + queryFn: () => getScrobbleByUri(uri), 22 22 }); 23 23 24 24 export const useFeedGeneratorsQuery = () =>
+2 -2
apps/web/src/pages/song/Song.tsx
··· 19 19 import Disc from "../../components/Icons/Disc"; 20 20 import Shout from "../../components/Shout/Shout"; 21 21 import SongCover from "../../components/SongCover"; 22 - import { useFeedByUriQuery } from "../../hooks/useFeed"; 22 + import { useScrobbleByUriQuery } from "../../hooks/useFeed"; 23 23 import { 24 24 useArtistAlbumsQuery, 25 25 useArtistTracksQuery, ··· 73 73 uri = `at://${did}/app.rocksky.scrobble/${rkey}`; 74 74 } 75 75 76 - const scrobbleResult = useFeedByUriQuery(uri); 76 + const scrobbleResult = useScrobbleByUriQuery(uri); 77 77 const songResult = useSongByUriQuery(uri); 78 78 79 79 const artistTracksResult = useArtistTracksQuery(