import React, { Component, PropTypes } from "react"; import CSSModules from "react-css-modules"; import { defineMessages, FormattedMessage } from "react-intl"; import FontAwesome from "react-fontawesome"; import { formatLength, messagesMap } from "../utils"; import commonMessages from "../locales/messagesDescriptors/common"; import css from "../styles/Album.scss"; const albumMessages = defineMessages(messagesMap(commonMessages)); class AlbumTrackRowCSS extends Component { render () { const length = formatLength(this.props.track.time); return ( {this.props.track.track} {this.props.track.name} {length} ); } } AlbumTrackRowCSS.propTypes = { track: PropTypes.object.isRequired }; export let AlbumTrackRow = CSSModules(AlbumTrackRowCSS, css); class AlbumTracksTableCSS extends Component { render () { var rows = []; this.props.tracks.forEach(function (item) { rows.push(); }); return ( {rows}
); } } AlbumTracksTableCSS.propTypes = { tracks: PropTypes.array.isRequired }; export let AlbumTracksTable = CSSModules(AlbumTracksTableCSS, css); class AlbumRowCSS extends Component { render () { return (

{this.props.album.name}

{this.props.album.name}

{ Array.isArray(this.props.album.tracks) ? : null }
); } } AlbumRowCSS.propTypes = { album: PropTypes.object.isRequired }; export let AlbumRow = CSSModules(AlbumRowCSS, css); export default class Album extends Component { render () { return ( ); } } Album.propTypes = { album: PropTypes.object.isRequired };