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
import { client } from ".";
2
3
export const getSongByUri = async (uri: string) => {
0
0
0
0
4
const response = await client.get("/xrpc/app.rocksky.song.getSong", {
5
params: { uri },
6
});
···
1
import { client } from ".";
2
3
export const getSongByUri = async (uri: string) => {
4
+
if (uri.includes("app.rocksky.scrobble")) {
5
+
return null;
6
+
}
7
+
8
const response = await client.get("/xrpc/app.rocksky.song.getSong", {
9
params: { uri },
10
});
+1
apps/web/src/pages/song/Song.tsx
···
185
186
const loading =
187
songResult.isLoading ||
0
188
artistTracksResult.isLoading ||
189
artistAlbumResult.isLoading;
190
···
185
186
const loading =
187
songResult.isLoading ||
188
+
scrobbleResult.isLoading ||
189
artistTracksResult.isLoading ||
190
artistAlbumResult.isLoading;
191