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

{this.props.album.get("name")}

{this.props.album.get("name")}

{ this.props.songs.size > 0 ? : null }
); } } AlbumRowCSS.propTypes = { album: PropTypes.instanceOf(Immutable.Map).isRequired, songs: PropTypes.instanceOf(Immutable.List).isRequired }; export let AlbumRow = CSSModules(AlbumRowCSS, css); export default class Album extends Component { render () { return ( ); } } Album.propTypes = { album: PropTypes.instanceOf(Immutable.Map).isRequired, songs: PropTypes.instanceOf(Immutable.List).isRequired };