import React, {Component} from 'react';
import { connect } from 'react-redux';
import style from './styles.less';
import pureRender from 'common/pureRender';
import { Link, IndexLink } from 'react-router';
import {Row, Col, Menu, Icon} from 'antd';
const SubMenu = Menu.SubMenu;

export class ProServiceCatalog extends React.Component {

  handleClick =(e) => {
    this.setState({
      current: e.key,
    });
  }
  render() {
    if(this.props.location.pathname === '/proServiceCatalog'){
      var content = (<div className={style.homepage}><h3>专业服务目录</h3></div>)
    }else{
      var content = this.props.children
    }
    return (
      <div className='csh-content'>
        <div className='csh-aside'>
          <Menu
            onClick={this.handleClick}
            mode="inline"
          >
            <Menu.Item key="0"><Link to="/proServiceCatalog">监控专业</Link></Menu.Item>
            <Menu.Item key="1">其他</Menu.Item>
          </Menu>
        </div>
        <div className='csh-main'>
          {content}
        </div>
      </div>
    );
  }
}

function mapStateToProps(state) {
  return {
  };
}

function mapDispatchToProps(dispatch) {
  return {
    dispatch,
  };
}

export default connect(mapStateToProps, mapDispatchToProps)(pureRender(ProServiceCatalog));
