import React, { Component, PropTypes } from "react"; import { IndexLink, Link} from "react-router"; 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"; const sidebarLayoutMessages = defineMessages(messagesMap(Array.concat([], commonMessages, messages))); export default class SidebarLayoutIntl extends Component { render () { const { formatMessage } = this.props.intl; const isActive = { discover: (this.props.location.pathname == "/discover") ? "active" : "", browse: (this.props.location.pathname == "/browse") ? "active" : "", artists: (this.props.location.pathname == "/artists") ? "active" : "", albums: (this.props.location.pathname == "/albums") ? "active" : "", songs: (this.props.location.pathname == "/songs") ? "active" : "", search: (this.props.location.pathname == "/search") ? "active" : "" }; return (

A mpache

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