import React, { Component, PropTypes } from "react";
import CSSModules from "react-css-modules";
import { defineMessages, FormattedMessage } from "react-intl";
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 (
);
}
}
AlbumTracksTableCSS.propTypes = {
tracks: PropTypes.array.isRequired
};
export let AlbumTracksTable = CSSModules(AlbumTracksTableCSS, css);
class AlbumRowCSS extends Component {
render () {
return (
{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
};