diff --git a/src/views/Recomended.jsx b/src/views/Recomended.jsx index 8f824be..9442f64 100644 --- a/src/views/Recomended.jsx +++ b/src/views/Recomended.jsx @@ -5,7 +5,7 @@ import {getArtist, getDisc, getSong} from '../services/entity_service'; import {EntityList} from '../components/EntityList'; import {CoverArt} from '../components/CoverArt'; -import {Grid, Row, Col} from '../components/Grid'; +import {Grid, Row, Col, RowCol} from '../components/Grid'; const PopularArtists = () => { const artistIDs = ['fa3b825f-7c85-4377-b393-d28a2016e293', 'b2d122f9-eadb-4930-a196-8f221eeb0c66', @@ -19,19 +19,20 @@ const PopularArtists = () => { getArtist(artistIDs[3])]) .then(artists => setArtists(artists)); return - }else { - const items = artists.map((artist) => ({ - 'cover': null, - 'link': `/artist/${artist.id}`, - 'title': artist.name, - 'subtitle': [artist.type, artist.country].filter(Boolean).join(' - '), - 'widget': {Math.floor(Math.random() * 1000)} - })); - const list = [{ - 'items': items - }]; - return -} + } else { + const items = artists.map((artist) => { + const widget = ( {Math.floor(Math.random() * 1000)}); + return { + 'cover': null, + 'link': `/artist/${artist.id}`, + 'title': artist.name, + 'subtitle': [artist.type, artist.country].filter(Boolean).join(' - '), + 'widget': widget + } + }); + const list = [{'items': items}]; + return + } } const PopularDiscs = () => { @@ -47,18 +48,22 @@ const PopularDiscs = () => { .then(discs => setDiscs(discs)); return }else { - const items = discs.map((disc) => ({ - 'cover': , - 'link': `/disc/${disc.id}`, - 'title': disc.title, - 'subtitle': disc.artist.name, - 'widget': {Math.floor(Math.random() * 1000)} -})); -const list = [{ - 'items': items -}]; -return -} + const items = discs.map((disc) => { + const cover = (); + const widget = ( {Math.floor(Math.random() * 1000)}) + return { + 'cover': cover, + 'link': `/disc/${disc.id}`, + 'title': disc.title, + 'subtitle': disc.artist.name, + 'widget': widget + } + }); + const list = [{ + 'items': items + }]; + return + } } const PopularSongs = () => { @@ -74,18 +79,21 @@ const PopularSongs = () => { .then(songs => setSongs(songs)); return }else { - const items = songs.map((song) => ({ - 'cover': null, - 'link': `/song/${song.id}`, - 'title': song.title, - 'subtitle': song.artist.name, - 'widget': {Math.floor(Math.random() * 1000)} - })); - const list = [{ - 'items': items - }]; - return -} + const items = songs.map((song) => { + const widget = ( {Math.floor(Math.random() * 1000)}); + return { + 'cover': null, + 'link': `/song/${song.id}`, + 'title': song.title, + 'subtitle': song.artist.name, + 'widget': widget + } + }); + const list = [{ + 'items': items + }]; + return + } } export const Recomended = () => { @@ -103,12 +111,10 @@ export const Recomended = () => { - - -

Discos Populares

- - -
+ +

Discos Populares

+ +
) }