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.get("time")); return ( {this.props.track.get("track")} {this.props.track.get("name")} {length} ); } } // TODO: Not object AlbumTrackRowCSS.propTypes = { track: PropTypes.object.isRequired }; export let AlbumTrackRow = CSSModules(AlbumTrackRowCSS, css); class AlbumTracksTableCSS extends Component { render () { let rows = []; this.props.tracks.forEach(function (item) { rows.push(); }); return ( {rows}
); } } // TODO: Not object AlbumTracksTableCSS.propTypes = { tracks: PropTypes.object.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 }
); } } // TODO: Not object AlbumRowCSS.propTypes = { album: PropTypes.object.isRequired, songs: PropTypes.object.isRequired }; export let AlbumRow = CSSModules(AlbumRowCSS, css); export default class Album extends Component { render () { return ( ); } } // TODO: Not object Album.propTypes = { album: PropTypes.object.isRequired, songs: PropTypes.object.isRequired };