// NPM imports 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"; // Local imports import { messagesMap } from "../../utils"; // Other components import WebPlayer from "../../views/WebPlayer"; // Translations import commonMessages from "../../locales/messagesDescriptors/common"; import messages from "../../locales/messagesDescriptors/layouts/Sidebar"; // Styles import css from "../../styles/layouts/Sidebar.scss"; // Define translations const sidebarLayoutMessages = defineMessages(messagesMap(Array.concat([], commonMessages, messages))); /** * Sidebar layout component, putting children next to the sidebar menu. */ class SidebarLayoutIntl extends Component { render() { const { formatMessage } = this.props.intl; // Check active links 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", }; // Hamburger collapsing function const collapseHamburger = function () { $("#main-navbar").collapse("hide"); }; return (