import React from 'react';
import { Menu, Icon } from 'antd';
import '../leftTab.less';
const SubMenu = Menu.SubMenu;
const MenuItemGroup = Menu.ItemGroup;


const LeftTab = React.createClass({
    getInitialState() {
        return {
            current: 'orgTechAchievement'
        };
    },
    handleClick(e) {
        this.props.handlekey(e.key);
        this.setState({
            current: e.key,
        });
    },
    componentWillMount() {
        if (window.location.hash) {
            this.state.current = window.location.hash.substr(1);
        };
    },
    render() {
        return (
            <Menu onClick={this.handleClick}
                selectedKeys={[this.state.current]}
                mode="vertical"
                className="account-left" >
                <Menu.Item key="orgTechAchievement">
                    组织科技成果列表
                </Menu.Item>
                <Menu.Item key="userTechAchievement">
                    个人科技成果列表
                </Menu.Item>
                <Menu.Item key="orgAchievementOrder">
                    组织成果订单列表
                </Menu.Item>
                <Menu.Item key="userAchievementOrder">
                    个人成果订单列表
                </Menu.Item>
            </Menu>
        );
    },
});

export default LeftTab;