import React from 'react'; import { Route, Switch } from 'react-router-dom'; import { connect } from 'react-redux'; import { selectServer } from '../servers/reducers/selectedServer'; import CreateShortUrl from '../short-urls/CreateShortUrl'; import ShortUrls from '../short-urls/ShortUrls'; import ShortUrlsVisits from '../short-urls/ShortUrlVisits'; import AsideMenu from './AsideMenu'; import { pick } from 'ramda'; export class MenuLayout extends React.Component { // FIXME Shouldn't use componentWillMount, but this code has to be run before children components are rendered componentWillMount() { const { serverId } = this.props.match.params; this.props.selectServer(serverId); } render() { return (