import React, { Component, PropTypes } from "react"; import { IndexLink, Link} from "react-router"; import CSSModules from "react-css-modules"; import { defineMessages, injectIntl, intlShape, FormattedMessage } from "react-intl"; import { messagesMap } from "../../utils"; import commonMessages from "../../locales/messagesDescriptors/common"; import messages from "../../locales/messagesDescriptors/layouts/Sidebar"; import css from "../../styles/layouts/Sidebar.scss"; const sidebarLayoutMessages = defineMessages(messagesMap(Array.concat([], commonMessages, messages))); class SidebarLayoutIntl extends Component { render () { const { formatMessage } = this.props.intl; const isActive = { discover: (this.props.location.pathname == "/discover") ? "active" : "link", browse: (this.props.location.pathname == "/browse") ? "active" : "link", artists: (this.props.location.pathname == "/artists") ? "active" : "link", albums: (this.props.location.pathname == "/albums") ? "active" : "link", songs: (this.props.location.pathname == "/songs") ? "active" : "link", search: (this.props.location.pathname == "/search") ? "active" : "link" }; return (

A mpache

{this.props.children}
); } } SidebarLayoutIntl.propTypes = { children: PropTypes.node, intl: intlShape.isRequired }; export default injectIntl(CSSModules(SidebarLayoutIntl, css));