import React, {Component} from 'react'; import {Layout, Menu} from 'antd'; import CaseNotification from "../common/caseNotification/CaseNotification"; import Notification from "./notification/Notification"; import GraphqlTrigger from "./graphqlTrigger/GraphqlTrigger"; import StockSignal from "./stockSignal/StockSignal"; const { Content } = Layout; class MonitorNotify extends Component { constructor() { super(); this.state = { menuLevel2: "notification", } } switchMenu = (menuName, e) => { console.log('menuName', menuName, 'e', e); this.setState({ [menuName]: e.key, }); }; render() { return (
this.switchMenu('menuLevel2', e)} selectedKeys={[this.state.menuLevel2]} > notification graphql trigger stock signal {(() => { switch (this.state.menuLevel2) { case 'notification': return ; case 'graphql-trigger': return ; case 'stock-signal': return ; default: return } })()}
) } } export default MonitorNotify;