import React, { Component, PropTypes } from "react"; import { formatLength } from "../utils"; export class AlbumTrackRow extends Component { render () { const length = formatLength(this.props.track.length); return ( {this.props.track.track} {this.props.track.name} {length} ); } } AlbumTrackRow.propTypes = { track: PropTypes.object.isRequired }; export class AlbumTracksTable extends Component { render () { var rows = []; this.props.tracks.forEach(function (item) { rows.push(); }); return ( {rows}
); } } AlbumTracksTable.propTypes = { tracks: PropTypes.array.isRequired }; export class AlbumRow extends Component { render () { return (

{this.props.album.name}

{this.props.album.name}

); } } AlbumRow.propTypes = { album: PropTypes.object.isRequired }; export default class Album extends Component { render () { return ( ); } } Album.propTypes = { album: PropTypes.object.isRequired };