You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// Show library of saved tracks if viewing first page
53
53
if(firstPage){
54
+
constlikedTracksData=likedTracksResponse.data
55
+
54
56
playlists.unshift({
55
57
"id": "liked",
56
58
"name": "Liked",
@@ -63,31 +65,32 @@ class PlaylistTable extends React.Component {
63
65
},
64
66
"tracks": {
65
67
"href": "https://api.spotify.com/v1/me/tracks",
66
-
"limit": likedTracksResponse.limit,
67
-
"total": likedTracksResponse.total
68
+
"limit": likedTracksData.limit,
69
+
"total": likedTracksData.total
68
70
},
69
71
"uri": "spotify:user:"+userId+":saved"
70
72
});
71
73
72
74
// FIXME: Handle unmounting
73
75
this.setState({
74
76
likedSongs: {
75
-
limit: likedTracksResponse.limit,
76
-
count: likedTracksResponse.total
77
+
limit: likedTracksData.limit,
78
+
count: likedTracksData.total
77
79
}
78
80
})
79
81
}
80
82
81
83
// FIXME: Handle unmounting
82
84
this.setState({
83
85
playlists: playlists,
84
-
playlistCount: playlistsResponse.total,
85
-
nextURL: playlistsResponse.next,
86
-
prevURL: playlistsResponse.previous
86
+
playlistCount: playlistsData.total,
87
+
nextURL: playlistsData.next,
88
+
prevURL: playlistsData.previous
87
89
});
88
90
89
-
$('#playlists').fadeIn();
90
-
$('#subtitle').text((playlistsResponse.offset+1)+'-'+(playlistsResponse.offset+playlistsResponse.items.length)+' of '+playlistsResponse.total+' playlists for '+userId)
91
+
if(document.getElementById("subtitle")!==null){
92
+
document.getElementById("subtitle").textContent=`${playlistsData.offset+1}-${playlistsData.offset+playlistsData.items.length} of ${playlistsData.total} playlists for ${userId}`
0 commit comments