@@ -52,9 +52,8 @@ class PlaylistTable extends React.Component {
52
52
53
53
// fake a playlist-like structure for the liked songs, so it plays well with the rest of the code
54
54
let liked_songs = { name : "Liked Songs" , external_urls : { spotify : "https://open.spotify.com/collection/tracks" } ,
55
- images :[ { url : "https://placehold.co/30?text=blank" } ] ,
56
- owner : { id : user . id , external_urls : { spotify : user . external_urls . spotify } } , tracks : { total : library . total ,
57
- href : "https://api.spotify.com/v1/me/tracks" } , public : false , collaborative : false }
55
+ images :[ { url : "liked_songs.jpeg" } ] , owner : { id : user . id , external_urls : { spotify : user . external_urls . spotify } } ,
56
+ tracks : { total : library . total , href : "https://api.spotify.com/v1/me/tracks" } , public : false , collaborative : false }
58
57
let playlists = [ [ liked_songs ] ] // double list so .flat() flattens everything right later
59
58
60
59
// Retrieve the list of all the user's playlists by querying the playlists endpoint.
@@ -119,10 +118,8 @@ class PlaylistTable extends React.Component {
119
118
React . createElement ( "tbody" , null ,
120
119
this . state . playlists . map ( ( playlist , i ) =>
121
120
React . createElement ( "tr" , null , // tr = table row
122
- React . createElement ( "td" , null , playlist . name == "Liked Songs" ? // td = table data
123
- React . createElement ( "i" , { className : "fa fa-heart" , style : { color : "#3A30CF" } } ) :
124
- React . createElement ( "img" , { src : playlist . images && playlist . images . length > 0 ? playlist . images [ 0 ] . url : "https://placehold.co/30?text=blank" , style : { width : "30px" , height : "30px" } } ) ) ,
125
- //React.createElement("i", { className: "fa fa-music" })),
121
+ React . createElement ( "td" , null , // td = table data
122
+ React . createElement ( "img" , { src : playlist . images ?. length > 0 ? playlist . images [ 0 ] . url : "https://placehold.co/30?text=blank" , style : { width : "30px" , height : "30px" } } ) ) ,
126
123
React . createElement ( "td" , null , React . createElement ( "a" , { href : playlist . external_urls . spotify } , playlist . name ) ) ,
127
124
React . createElement ( "td" , null , React . createElement ( "a" , { href : playlist . owner . external_urls . spotify } , playlist . owner . id ) ) ,
128
125
React . createElement ( "td" , null , playlist . tracks . total ) ,
0 commit comments