Created
August 14, 2018 01:36
-
-
Save kilmc/4bc70b7941b8f5cf7653d666d17e1145 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const audioArr = [ | |
| { | |
| albumName: 'Time Management', | |
| artwork: 'image.jpg', | |
| releaseDate: '2015-10-02', | |
| soundCloudLink: 'http://soundcloud.com/stuff', | |
| spotifyLink: 'http://spotify.com', | |
| iTunesLink: 'itunes.com' | |
| }, | |
| { | |
| albumName: 'I don\'t need anything from anybody (single)', | |
| artwork: 'image.jpg', | |
| releaseDate: '2015-03-30', | |
| soundCloudLink: 'http://soundcloud.com/stuff', | |
| spotifyLink: 'http://spotify.com', | |
| iTunesLink: 'itunes.com' | |
| }, | |
| { | |
| albumName: 'Process', | |
| artwork: 'image.jpg', | |
| releaseDate: '2015-10-02', | |
| soundCloudLink: 'http://soundcloud.com/stuff', | |
| spotifyLink: 'http://spotify.com', | |
| iTunesLink: 'itunes.com' | |
| } | |
| ] | |
| const Release = ({ | |
| albumName, | |
| artwork, | |
| releaseDate, | |
| soundCloudLink, | |
| spotifyLink, | |
| iTunesLink | |
| }) => { | |
| return ( | |
| <div> | |
| <img src={artwork}/> | |
| <h3>{albumName}</h3> | |
| <time>{releaseDate}</time> | |
| <div> | |
| {soundCloudLink} | |
| </div> | |
| <div> | |
| <a href={spotifyLink}>Spotify</a> | |
| <a href={iTunesLink}>iTunes</a> | |
| </div> | |
| </div> | |
| ) | |
| } | |
| const Audio = ({ releases }) => { | |
| return ( | |
| releases.map(release => { | |
| return ( | |
| <Release | |
| albumName={release.albumName} | |
| artwork={release.artwork} | |
| releaseDate={release.releaseDate} | |
| soundCloudLink={release.soundCloudLink} | |
| spotifyLink={release.spotifyLink} | |
| iTunesLink={release.iTunesLink} | |
| /> | |
| ) | |
| }) | |
| ) | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment