import { withRouter } from 'react-router-dom' import { me } from '../initial_state' import { CX } from '../constants' import Button from './button' export default @withRouter class FooterBar extends PureComponent { static contextTypes = { router: PropTypes.object, } render() { if (!me) return false const noRouter = !this.context.router const currentPathname = noRouter ? '' : this.context.router.route.location.pathname const buttons = [ { to: '/home', icon: 'home', title: 'Home', active: currentPathname === '/home', }, { to: '/notifications', icon: 'notifications', title: 'Notifications', active: currentPathname === '/notifications', }, { href: 'https://chat.gab.com', icon: 'chat', title: 'Chat', }, { href: 'https://trends.gab.com', icon: 'trends', title: 'Trends', }, { to: '/groups', icon: 'group', title: 'Groups', active: currentPathname === '/groups', }, ] return (