import React, { Component } from 'react';


import MenuWraps from '../MenuComponent/Menu';
import SendItem from './SubSendItem';
import CheckItem from './SubCheckItem'
import CheckReplyItem from './SubCheckReplyItem'

const menu_nav = [
  {
    name:"待审查帖子",
    key:`checkPost`,
    content:CheckItem
  },
  {
    name:"待审查回复",
    key:`checkReply`,
    content:CheckReplyItem
  },
  {
    name:"已发布的帖子",
    key:`sendPost`,
    content:SendItem
  }
]
class CheckPublic extends Component {
  constructor(props){
    super(props);
    this.state={
      activeKey:undefined
    }
  }
  changeTab=(activeKey)=>{
    this.setState({
      activeKey
    })
  }

  render(){
    return(
      <div className="edu-back-white mb20">
        <MenuWraps 
        {...this.props}
        {...this.state}
        className="plate-left-Menu moderatorMenu" 
        menu_nav={menu_nav} 
        defaultUrlKey={"checkPost"} 
        changeTab={this.changeTab}/>
      </div>
    )
  }
}

export default CheckPublic;