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
fix artist infos loading
tsiry-sandratraina.com
1 year ago
98791ca8
c0835c21
+6
-3
1 changed file
expand all
collapse all
unified
split
rockskyweb
src
pages
artist
Artist.tsx
+6
-3
rockskyweb/src/pages/artist/Artist.tsx
···
21
21
`;
22
22
23
23
const Artist = () => {
24
24
+
const [loading, setLoading] = useState(true);
24
25
const { did, rkey } = useParams<{ did: string; rkey: string }>();
25
26
const { getArtist, getArtistTracks, getArtistAlbums } = useLibrary();
26
27
const artist = useAtomValue(artistAtom);
···
54
55
return;
55
56
}
56
57
const fetchArtist = async () => {
58
58
+
setLoading(true);
57
59
const data = await getArtist(did, rkey);
58
60
setArtist({
59
61
id: data.xata_id,
···
68
70
uri: data.uri,
69
71
spotifyLink: data.spotify_link,
70
72
});
73
73
+
setLoading(false);
71
74
};
72
75
fetchArtist();
73
76
···
113
116
<div style={{ paddingBottom: 100, paddingTop: 50 }}>
114
117
<Group>
115
118
<div style={{ marginRight: 20 }}>
116
116
-
{artist?.picture && (
119
119
+
{artist?.picture && !loading && (
117
120
<Avatar name={artist?.name} src={artist?.picture} size="150px" />
118
121
)}
119
119
-
{!artist?.picture && (
122
122
+
{!artist?.picture && !loading && (
120
123
<div
121
124
style={{
122
125
width: 150,
···
140
143
</div>
141
144
)}
142
145
</div>
143
143
-
{artist && (
146
146
+
{artist && !loading && (
144
147
<div>
145
148
<HeadingMedium marginBottom={0}>{artist?.name}</HeadingMedium>
146
149
<div