feat: add recent movies feed
This commit is contained in:
parent
7e42d1789d
commit
2fef5d60d8
6 changed files with 404 additions and 2 deletions
|
@ -17,7 +17,9 @@ const fetchRecentTracks = async () => {
|
|||
const tracks = response.recenttracks.track.slice(0, 5);
|
||||
|
||||
const recentTracks = tracks.map((track) => {
|
||||
const timestamp = dayjs(track.date["#text"]).utc(true).fromNow();
|
||||
const timestamp = track.date
|
||||
? dayjs(track.date["#text"]).utc(true).fromNow()
|
||||
: dayjs().fromNow();
|
||||
return {
|
||||
artist: track.artist["#text"],
|
||||
track: track.name,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue