tangled
alpha
login
or
join now
t1c.dev
/
rocksky
forked from
rocksky.app/rocksky
2
fork
atom
A decentralized music tracking and discovery platform built on AT Protocol 🎵
2
fork
atom
overview
issues
pulls
pipelines
[web] optimize client requests
tsiry-sandratraina.com
8 months ago
698da259
4aecfac2
+5
2 changed files
expand all
collapse all
unified
split
apps
web
src
api
library.ts
pages
song
Song.tsx
+4
apps/web/src/api/library.ts
···
1
1
import { client } from ".";
2
2
3
3
export const getSongByUri = async (uri: string) => {
4
4
+
if (uri.includes("app.rocksky.scrobble")) {
5
5
+
return null;
6
6
+
}
7
7
+
4
8
const response = await client.get("/xrpc/app.rocksky.song.getSong", {
5
9
params: { uri },
6
10
});
+1
apps/web/src/pages/song/Song.tsx
···
185
185
186
186
const loading =
187
187
songResult.isLoading ||
188
188
+
scrobbleResult.isLoading ||
188
189
artistTracksResult.isLoading ||
189
190
artistAlbumResult.isLoading;
190
191