import React from 'react';
import { Spin, Button, Tabs, Table, message, Modal, Tooltip } from 'antd';

import '../content.less';
import './content.less';

const TabPane = Tabs.TabPane;

const Content = React.createClass({
  getInitialState() {
    return {
      loading: false,
      component: '<div></div>'
    };
  },

  componentWillMount() {
    let Module = require('./contacts/index').default;
    require.ensure([], () => {
      this.setState({
        component: <Module />,
      });
    });
  },
  
  render() {
    return (
      <div className="manage-content">
        <div className="content-right">
          <Spin spinning={this.state.loading} className='spin-box'>
            <div className="index-content">
              {this.state.component}
            </div>
          </Spin>
        </div>
      </div>
    )
  }
});

export default Content;


